aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-07-05 04:44:21 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2017-07-05 04:44:21 +1200
commit7a737d5d6f4b9094e824fb966433fa32e73bfd19 (patch)
treeb8969c2ef9c4f45dbe9edf1fe31aac0c52c09a47 /web
parent716851aea171ce3812c1283becef5b62564431ec (diff)
downloadtrackermap-web-7a737d5d6f4b9094e824fb966433fa32e73bfd19.tar.gz
trackermap-web-7a737d5d6f4b9094e824fb966433fa32e73bfd19.tar.bz2
trackermap-web-7a737d5d6f4b9094e824fb966433fa32e73bfd19.zip
Fix email address validation
Diffstat (limited to 'web')
-rw-r--r--web/app/view/dialog/Register.js8
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',