From 7a737d5d6f4b9094e824fb966433fa32e73bfd19 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 5 Jul 2017 04:44:21 +1200 Subject: Fix email address validation --- web/app/view/dialog/Register.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'web') 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', -- cgit v1.2.3