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

Steffen Müller typo3 at t3node.com
Tue Jan 31 14:41:36 CET 2012


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


More information about the TYPO3-project-typo3v4mvc mailing list