I want to do a form validating in the most common way. Is there a tool for that, maybe, jQuery plugin?
For instance, for the following rules:
- All textboxes should not be empty
- If ‘Show License’ checkbox is checked, ‘I accept’ should be checked too.
the validating expression will go like ‘input:text:[value=""], input:checkbox:checked#showlicense ? input:checkbox:unchecked#iaccept : nothing‘.
I’d be happy to implement this on jQuery selectors (returning invalid controls), but I don’t know how to implement conditions.
Regards,
look for jquery validate plugin, its already out there..
http://docs.jquery.com/Plugins/Validation