Jquery Validation without form submission

I have a form, on which I have a button - When the user clicks the button Add, a function is called which adds a new row to a table in the same form, but using javascript.

I have used the jquery validation plugin,the problem I have is that the validation only fires when I use a submit button,but not when my button is clicked, which runs my function.

I understand why this is - The validation plugin wants the form to be submitted.

Is there any way I can cause the validation to run and return its result? My function can then either do nothing if the validation fails, or go ahead and post the user entered data to my function if the validation passes. Obviously I would need to do this without the form actually submitting.

Any help greatly appreciated - I've tried a few ideas I found whilst Googling on this, but nothing has worked so far.

Thank you beforehand.


If you mean http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/

if ($j('#Form1').validationEngine({ returnIsValid: true })) {
  //is valid

Or if you mean: http://docs.jquery.com/Plugins/Validation

 submitHandler: function(form) {
   // some other code
   return false;

Need Your Help

ElasticSearch Analyzer and Tokenizer for Emails

email elasticsearch lucene tokenize analyzer

I could not find a perfect solution either in Google or ES for the following situation, hope someone could help here.

Defining a stack data structure and its main operations in lambda calculus

lambda functional-programming lambda-calculus combinators y-combinator

I'm trying to define a stack data structure in lambda calculus, using fixed point combinators. I am trying to define two operations, insertion and removal of elements, so, push and pop, but the onl...