is there way to create a rule in the jquery validiation plugin that allows you to say not contains "value"?
A:
doesnotContain: function(value, element, param) {
return this.optional(element) || (value.indexOf(param)>0)?true:false;
},
Something like that?
Gausie
2009-12-18 11:12:24
+1
A:
you can add method
jQuery.validator.addMethod("notcontainfoo", function(value, element) {
return value != 'foo';
}, "You can't fill this with 'foo' !! ");
Anwar Chandra
2009-12-18 11:21:33