diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-07-05 04:44:21 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-07-05 04:44:21 +1200 |
commit | 7a737d5d6f4b9094e824fb966433fa32e73bfd19 (patch) | |
tree | b8969c2ef9c4f45dbe9edf1fe31aac0c52c09a47 /web/app/view/dialog | |
parent | 716851aea171ce3812c1283becef5b62564431ec (diff) | |
download | trackermap-web-7a737d5d6f4b9094e824fb966433fa32e73bfd19.tar.gz trackermap-web-7a737d5d6f4b9094e824fb966433fa32e73bfd19.tar.bz2 trackermap-web-7a737d5d6f4b9094e824fb966433fa32e73bfd19.zip |
Fix email address validation
Diffstat (limited to 'web/app/view/dialog')
-rw-r--r-- | web/app/view/dialog/Register.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/web/app/view/dialog/Register.js b/web/app/view/dialog/Register.js index f4f5a395..fec30683 100644 --- a/web/app/view/dialog/Register.js +++ b/web/app/view/dialog/Register.js @@ -40,7 +40,13 @@ Ext.define('Traccar.view.dialog.Register', { xtype: 'textfield', name: 'email', fieldLabel: Strings.userEmail, - vtype: 'email', + validator: function (val) { + if (/(.+)@(.+){2,}\.(.+){2,}/.test(val)) { + return true; + } else { + return Ext.form.field.VTypes.emailText; + } + }, allowBlank: false }, { xtype: 'textfield', |