Javascript form validation - what's lacking?

Posted by box9 on Programmers See other posts from Programmers or by box9
Published on 2010-12-13T00:07:24Z Indexed on 2012/10/24 5:26 UTC
Read the original article Hit count: 281

Filed under:
|

I've tried out two javascript form validation frameworks - jQuery validation, and jQuery Tools validator - and I've found both of them lacking. jQuery validation lacks the clear separation between the concepts of "validating" and "displaying validation errors", and is highly inflexible when it comes to displaying dynamic error messages. jQuery Tools on the other hand lacks decent remote validation support (to check if a username exists for example). Even though jQuery validation supports remote validation, the built-in method requires the server to respond in a particular format. In both cases, any sort of asynchronous validation is a pain, as is defining rules for dependencies between multiple inputs.

I'm thinking of rolling my own framework to address these shortcomings, but first I want to ask... have others experienced similar annoyances with javascript validation? What did you end up doing? What are some common validation requirements you've had which really should be catered for? And are there other, much better frameworks out there which I've missed?

I'm looking primarily at jQuery-based frameworks, though well-implemented frameworks built on other libraries can still provide some useful ideas.

© Programmers or respective owner

Related posts about JavaScript

Related posts about validation