Im using jquery validate and I wish to add a method that input text cannot contain ".com"
Im tried:
//.com Validator
$.validator.addMethod('dotcom', function(value, element) {
return this.optional(element) || (!value.match(/[.com]/) && value.match(/[.com]/));
},
dotcom);
But this doesn't work, any suggestion to do that ? thanks