diff --git a/checker.js b/checker.js new file mode 100644 index 0000000..ed3065d --- /dev/null +++ b/checker.js @@ -0,0 +1,6 @@ +function validateEmail(email) { + var 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(String(email).toLowerCase()); +} + +console.log(validateEmail('hafrizreSa@gmail.com')) \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..99a8b4a --- /dev/null +++ b/index.html @@ -0,0 +1,44 @@ + + + +
+ + + +