From: "Warren Young" <warren@etr-usa.com>
On 4/14/2014 13:39, Octavian Rasnita wrote:
3. Javascript is not active on browser.
Okay, granted. That's not allowed in my Dancer app, since there are plenty of other things that require JS, but I concede the point.
Is that really a big slice of your user base, though?
You might be chasing an 0.0001% slice. If only 1% of your app's users have disabled JS in their browser, and those savvy 1% have error rates of only 1%, and of that fraction only 1% are so UI sensitive that they will go use some other web app rather than deal with errors tossed into a common <div> rather than be bound to the UI controls that caused them, then you're spending too much time keeping too few users.
In my experience[*], that last term goes nearly to 0%, since disabling JS breaks so much UI on the web that they're already self-selecting into a group that doesn't care about UI details.
That's not the point. The validation should be always done server-side because it is the only way of assuring that the accepted data is valid. And if this server-side validation should be always done, it is better to use a form processor that can also display the error messages without effort. Client-side validation can be helpful, to avoid a form submit and page re-display, but it is optional. For HTML::FormFu there is the module HTML::FormFu::ExtJS that might help creating client-side validation based on the server-side validation settings. I said "might help" because I have never used it. Octavian