Fix firefox issue for email field with extra whitespaces

This commit is contained in:
noraiz-anwar
2017-04-13 15:34:08 +05:00
parent be5c4fad8b
commit 8fa31a80ca

View File

@@ -157,6 +157,12 @@
$label = $form.find('label[for=' + $el.attr('id') + ']');
key = $el.attr('name') || false;
// Due to a bug in firefox, whitespaces in email type field are not removed.
// TODO: Remove this code once firefox bug is resolved.
if (key === 'email') {
$el.val($el.val().trim());
}
if (key) {
test = this.validate(elements[i]);
if (test.isValid) {