Open CEscorcio opened 6 years ago
Hello!
I managed a similar case by using custom validations:
let opts = {
custom: {
my_select_valiadator: function ($el) {
if($el.val() == "" ) {
return "please select something!";
}
}
};
$("select").validate(opts);
and then add to your inspected select element the attribute "data-my_select_validator="my_select_validator"
Greetings
How can the validation work in selection option? I have the follow code, and i want the get an validation error if i dont choose any shop.