9 lines
256 B
TypeScript
9 lines
256 B
TypeScript
|
export function validEmail(value: string) {
|
||
|
return (
|
||
|
value &&
|
||
|
!!value.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,}))$/
|
||
|
)
|
||
|
)
|
||
|
}
|