public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH pmg-gui v2] utils: anchor regex expression
@ 2024-02-26 15:32 Maximiliano Sandoval
  2024-02-27  9:25 ` [pmg-devel] applied: " Dominik Csapak
  0 siblings, 1 reply; 2+ messages in thread
From: Maximiliano Sandoval @ 2024-02-26 15:32 UTC (permalink / raw)
  To: pmg-devel

Without anchoring this would match for example `a@b/c`.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
 js/Utils.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/js/Utils.js b/js/Utils.js
index 9009e9e..149abd6 100644
--- a/js/Utils.js
+++ b/js/Utils.js
@@ -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",
 });
-- 
2.39.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-27  9:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-26 15:32 [pmg-devel] [PATCH pmg-gui v2] utils: anchor regex expression Maximiliano Sandoval
2024-02-27  9:25 ` [pmg-devel] applied: " Dominik Csapak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal