mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-10-04 05:48:46 +00:00
utils: anchor regex expression
Without anchoring this would match for example `a@b/c`. Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
This commit is contained in:
parent
aa2fe15562
commit
443e7de1f4
@ -921,7 +921,7 @@ Ext.define('PMG.Async', {
|
||||
Ext.apply(Ext.form.field.VTypes, {
|
||||
// matches the pmg-email-address in pmg-api
|
||||
PMGMail: function(v) {
|
||||
return (/[^\s\\@]+@[^\s/\\@]+/).test(v);
|
||||
return (/^[^\s\\@]+@[^\s/\\@]+$/).test(v);
|
||||
},
|
||||
PMGMailText: gettext('Example') + ": user@example.com",
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user