mirror of https://github.com/fantasticit/think.git
8 lines
260 B
TypeScript
8 lines
260 B
TypeScript
|
export const isEmail = (email) => {
|
||
|
return !!String(email)
|
||
|
.toLowerCase()
|
||
|
.match(
|
||
|
/^(([^<>()[\]\\.,;:\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,}))$/
|
||
|
);
|
||
|
};
|