From c97fb43abba375920fff361ec5fa4eb64a5a0d3f Mon Sep 17 00:00:00 2001 From: John Barratt Date: Tue, 7 Mar 2023 10:25:23 -0800 Subject: add email form submit for verifying --- src/lib/utils.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lib/utils.js') diff --git a/src/lib/utils.js b/src/lib/utils.js index 80f7fe07..d510195b 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -231,3 +231,9 @@ export function ss(str1, str2) { return 0.0; } + +export const validateEmail = (email) => { + 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,}))$/; + return re.test(email); +}; \ No newline at end of file -- cgit v1.2.3