I have a text input called strCompanyName which I need to perform some validation on. Now I have the below working fine where I get a warning if the text in the input matches "Company", however, I am unsure how I would check to see if the input matches a number of values ie. "Company", "Your Company", "Your Company Name"
jQuery.validator.addMethod("notEqual", function(value, element, param) {
return this.optional(element) || value.toLowerCase() != param.toLowerCase();
}, "Please specify your company name");
$("form").validate({
rules: {
strCompanyName: { notEqual: "Company" }
}
});
Any help would be greatful.