From 3673e21a770665db118a68e61cb5737851b5aed4 Mon Sep 17 00:00:00 2001 From: nauadratti Date: Thu, 30 Mar 2017 19:05:22 +0000 Subject: [PATCH] Allow punycode encoded TLDs in email Closes #500 --- src/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.js b/src/util.js index 78394ad4..abf92927 100644 --- a/src/util.js +++ b/src/util.js @@ -43,7 +43,7 @@ export default { if (!this.isString(data)) { return false; } - const re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + const re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+([a-zA-Z]{2,}|xn--[a-zA-Z\-0-9]+)))$/; return re.test(data); },