Commit 8fa31a80 by noraiz-anwar

Fix firefox issue for email field with extra whitespaces

parent be5c4fad
...@@ -157,6 +157,12 @@ ...@@ -157,6 +157,12 @@
$label = $form.find('label[for=' + $el.attr('id') + ']'); $label = $form.find('label[for=' + $el.attr('id') + ']');
key = $el.attr('name') || false; 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) { if (key) {
test = this.validate(elements[i]); test = this.validate(elements[i]);
if (test.isValid) { if (test.isValid) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment