jqBootstrapValidation
jqBootstrapValidation copied to clipboard
non working email validation
validemail: {
name: "Validemail",
type: "regex",
regex: "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\\.[A-Za-z]{2,4}",
message: "Not a valid email address<!-- data-validator-validemail-message to override -->"
},
your regex doesn't support TLDs like .travel, .solution, . expert, ...
Same issue with a [email protected] address. It says is not a valid address.
This is what I did as a workaround till validation gets fixed.
$("input").not("[type=submit]").jqBootstrapValidation({
filter: function () {
if($(this).attr('type') == 'email')
return false;
return true;
}
});
Another workaround is override the default function, like:
$.jqBootstrapValidation('override', {
builtInValidators: {
validemail: {
name: 'Validemail',
type: 'regex',
regex: '[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\\.[A-Za-z]{2,6}',
message: 'Not a valid email address'
}
}
});