6 lines
280 B
JavaScript
6 lines
280 B
JavaScript
|
export default function isValidEmail(email) {
|
||
|
/* eslint-disable no-useless-escape */
|
||
|
const reg = /^(([^<>()\[\]\\.,;:\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 reg.test(email);
|
||
|
}
|