I am using the jQuery validation tool https://jqueryvalidation.org/
And trying to validate a field for the value of either "green", "Green" or "GREEN". Can you add multiple equals values to the rules? Or may be it is better to convert the string to lowercase?
$.validator.addMethod("equals", function(value, element, string) {
return value === string;
}, $.validator.format("Please answer the question"));
$("#contactForm").validate({
rules: {
question: {
required: true,
equals: "green"
}
}
});