| @@ -1,10 +1,10 @@ | ||
| 1 | -/** | |
| 2 | - * Validate is an email. | |
| 3 | - * | |
| 4 | - * @param email | |
| 5 | - * @return {boolean} | |
| 6 | - */ | |
| 7 | -export default function isEmail( email ) { | |
| 8 | - 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,}))$/; | |
| 9 | - return re.test( email ); | |
| 10 | -} | |
| 1 | +/** | |
| 2 | + * Validate is an email. | |
| 3 | + * | |
| 4 | + * @param email | |
| 5 | + * @return {boolean} | |
| 6 | + */ | |
| 7 | +export default function isEmail( email ) { | |
| 8 | + 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,}))$/; | |
| 9 | + return re.test( email ); | |
| 10 | +} | |