views:

350

answers:

2

I use a jquery validation plugin and I need to add some extra checking, but I can't edit the main file. How I can do this?

A: 

You can add your own validation methods with addMethod function

Imran
need more documentation
nazmul hasan
Thanks, thank you very much......
nazmul hasan
A: 

yes i get the solution just taking this i got the solution ,, greaterThanZero is the class name of field to be checked

jQuery.validator.addMethod("greaterThanZero", function(value, element) { console.log(element); return this.optional(element) || /^\d*.{0,1}\d+$/.test(value); }, "* Amount must be greater than zero");

nazmul hasan