I am using jquery form validation plugin
http://docs.jquery.com/Plugins/Validation/validate
How can I set a callback which will be get called before calling it’s validation function ?
I want to trim the values and some pre-validation.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
addMethod() lets you create own validation method instead of using predfined ones. Within method do the processing necessary.
For example for trimming you could trim the value, and replace it in field…and test against the trimmmed value. Otherwise using change event handlers on fields would likely help also
http://docs.jquery.com/Plugins/Validation/Validator/addMethod#namemethodmessage