JQuery Validation for Data List

Posted on Posted in JQuery

JQuery Method by which we can validate the value is chosen from data list or not .


jQuery.validator.addMethod(“chekMatrix”,function(value, element)
var val=$(“#payInMatrix”).val();
var obj=$(“#matrix”).find(“option[value='”+val+”‘]”)
if(obj !=null && obj.length>0)
return true;

},’Please Enter only from list’);

Leave a Reply

Your email address will not be published. Required fields are marked *