From 573a87b56db3127f20427fb45b12a59630abe678 Mon Sep 17 00:00:00 2001 From: Y_Less Date: Thu, 21 Dec 2017 18:20:59 +0000 Subject: [PATCH] Remove validateEmail entirely (#294). --- snippets/validateEmail.md | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 snippets/validateEmail.md diff --git a/snippets/validateEmail.md b/snippets/validateEmail.md deleted file mode 100644 index cb5588474..000000000 --- a/snippets/validateEmail.md +++ /dev/null @@ -1,12 +0,0 @@ -### validateEmail - -Returns `true` if the given string is a valid email, `false` otherwise. - -Use a regular expression to check if the email is valid. -Returns `true` if email is valid, `false` if not. - -```js -const validateEmail = str => - /^(([^<>()\[\]\\.,;:\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,}))$/.test(str); -// validateEmail(mymail@gmail.com) -> true -```