[pve-devel] [PATCH widget-toolkit] toolkit: update email regex for acme account

Lorenz Stechauner l.stechauner at proxmox.com
Fri Apr 23 10:02:12 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>
---
 src/Toolkit.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Toolkit.js b/src/Toolkit.js
index 6ae31ed..ac6ab93 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