init commit

This commit is contained in:
modeht
2022-10-03 19:59:51 +02:00
commit 057e9306df
497 changed files with 109776 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
exports.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,}))$/;
const reStartAndEnd = /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}/g;
if (re.test(email) && reStartAndEnd.test(email)) {
return true;
}
return false;
};