[pve-devel] [PATCH v2 widget-toolkit] toolkit: update email regex for acme account
Lorenz Stechauner
l.stechauner at proxmox.com
Fri Apr 23 10:15:13 CEST 2021
Email regex only allowed two domain parts.
(probably copy/paste error from PVE::Tools)
Now allowing multiple domain parts.
Reported in our community forum:
https://forum.proxmox.com/threads/wrong-email-validation-when-adding-acme-account.88074/
Signed-off-by: Lorenz Stechauner <l.stechauner at proxmox.com>
---
In regex the _ character is already included in \w, therefore removing it
src/Toolkit.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/Toolkit.js b/src/Toolkit.js
index 6ae31ed..ffbd47a 100644
--- a/src/Toolkit.js
+++ b/src/Toolkit.js
@@ -184,7 +184,7 @@ Ext.apply(Ext.form.field.VTypes, {
passwordText: gettext('Passwords do not match'),
email: function(value) {
- let emailre = /^[\w+~-]+(\.[\w+~-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)$/;
+ let emailre = /^[\w+~-]+(\.[\w+~-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$/;
return emailre.test(value);
},
});
--
2.20.1
More information about the pve-devel
mailing list