jQuery validation: how to customize trigger and response

Posted by user302307 on Stack Overflow See other posts from Stack Overflow or by user302307
Published on 2010-03-26T05:55:21Z Indexed on 2010/03/26 6:03 UTC
Read the original article Hit count: 520

Filed under:
|

I am new with jQuery. I have a servlet based application which render an HTML form. This form is submitted via a function and the submit button IS NOT submit button in HTML. It's a regular button that calls a javascript function to do the submission.

When running the submission function, the servlet also run a function called doCheck() which is in javascript. This doCheck() function can be defined per page basis. if doCheck returns false, then the servlet will stop the submission; else it will submit the form.

I want to use jQuery validation to fit the servlet application. Is there a way to customize jQuery validation to be triggered manually (ie. only when doCheck() is executed) but at the same time provides continuous check on the UI (ie. if one type invalid number in date field, it will gives the appropriate msg when onblur event happen)? Is there a way to make jQuery validation return true or false? Thank you.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-validate