Question

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?

Was it helpful?

Solution

You can add your own validation methods with addMethod function

OTHER TIPS

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");

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top