From f47cacd2994f7f4037270f7b38c05875fb8c6eb7 Mon Sep 17 00:00:00 2001 From: Rish Date: Tue, 28 Jul 2020 18:37:06 +0530 Subject: [PATCH] Fixed lint no issue - Fixed useless-escape in validator email regex --- ghost/portal/src/utils/validator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/portal/src/utils/validator.js b/ghost/portal/src/utils/validator.js index cd87a4860e..8819f4df2c 100644 --- a/ghost/portal/src/utils/validator.js +++ b/ghost/portal/src/utils/validator.js @@ -1,4 +1,4 @@ export const isValidEmail = (email) => { - const re = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; + const re = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/; return !!email && re.test(String(email).toLowerCase()); };