I am looking at validation of some text boxes for things like required,
minlength, max length, email etc… I am able to get examples that work fine on submit button on page. I want to do this validation on a button click which will only raise a Ajax request and not submit of page.
On the Internet all the samples found was with a submit button. Is there an
easy way to change this code a little bit to make it work for non submit button click or any
new jQuery or Java plugin to do the same?
I am using the jquery.validation.js for now. This works with submit buttons.
Any kind of help with suggestion or help is appreciated.
The jQuery validator plugin already handles this. Just tweak some of the options in the
validatemethod.As quoted in the documentation for the onfocusout option:
Code Example:
That’s just one of a few dozen options you can configure. You can see the full list of options for the
validatemethod here:http://docs.jquery.com/Plugins/Validation/validate#options