Validate - Allow only 1 Wildcard Character in Input
Apologies if this has already been answered (I did search 1st!)
I have a search form which has simple validation on a form input field. I have restricted it to a minimum of 3 characters but need only one of them to be a wildcard.
I'm using a "%" as a wildcard and therefore
"ab%" is valid but
"%%%" and
"a%%" etc. are not.
Any help is GREATLY appreciated!
My current code is :
$(document).ready(function(){
$("#form1").validate({
rules: {
c: {
required: true,
minlength: 3
}
}
});
});