EDIT
contacted the author of play-js-validation. Bleeding edge stuff; Play has to be compiled against scala virtualized on to-be-released 2.10, and nested case classes are not yet supported. Really impressive project, I hope it comes to fruition as the prototype does almost exactly what I was hoping for...
Found this: https://github.com/namin/play-js-validation
Anyone know if there are plans for built-in client-side validation in Play 2.0?
I am currently generating controller, model (with form validation), and dao scala files based on an existing DB schema; would love to include client-side validation as part of that process!
Thanks for clues, insider knowledge, etc.
p.s. Play user group is, to say the least, busy; most posts seem to be completely ignored (of course, many Stackoverflow Play-related questions go unanswered as well, so this thread may be DOA...)
There's no such plans I'm afraid, at least didn't hear about (note: I'm not a dev team member, just Player)
Check tickets on Play's Lighthouse
On the other hand I doubt if this fits Play's assumptions at all. Client-side validation is done with some external JS solution which should not be determined by framework, nobody said that it should use ie. jQuery by default.
Finally, the only thing to use client-side validation is just to include the JS libs and add proper attributes to your form fields, ie it will create tag that you can validate with jQuery Validation plugin:
@inputText(entrantForm("identitynumber"),
'_label->"Identity number",
'class -> "required",
'minlength -> "11",
'maxlength -> "11")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With