[TYPO3-mvc] Render model validation rules in fluid form fields

Claus Due claus at wildside.dk
Tue Jan 31 14:50:01 CET 2012


Hi Steffen,

The fed:form ViewHelper already does this per-property or per-object validation using AJAX. I am considering turning this into a Widget which can be used as a container for form fields, making them validate and save using AJAX.

I suppose you can use the fed:form ViewHelper to get validation going - but it doesn't state the rules when rendering the form field and there is currently no reporting of the particular error which occurred, just that an error occurred.

http://fedext.net/fed-viewhelpers/form/ajax-validation/ (replace your f:form with this)

---
Cheers,
Claus
http://fedext.net

On Jan 31, 2012, at 2:41 PM, Steffen Müller wrote:

> Hi.
> 
> Extbase ships validation which fetches rules from the model annotations.
> The framework validates these rules transparently on serverside which is
> awesome.
> 
> Now customers often ask for additional validation on client side
> (browser), either on a per-field basis or before sending the request.
> On the web there's a lot of JS flying around, which ships validation
> logic implementation. HTML5 even comes with native support for that. [1]
> No need to make hands dirty here.
> 
> But what about implementation of validation _rules_  in the frontend?
> Is there already a viewhelper around, which maps validation annotations
> from the model to attributes of form input elements?
> 
> I see two requirements:
> * AJAX API for validation tests
> * pattern/type/required attributes ofr HTML5 or equivalent JS based
> backports (e.g. modernizr polyfills [2], datapattern, ...)
> 
> Is there already something around?
> Anyone interested in implementing this?
> 
> [1]
> http://dev.opera.com/articles/view/new-form-features-in-html5/#validation
> [2] http://www.modernizr.com/docs/#input
> 
> -- 
> cheers,
> Steffen
> 
> TYPO3 Blog: http://www.t3node.com/
> Twitter: @t3node - http://twitter.com/t3node
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list