# learnpress/4.2.0/assets/src/js/utils/email-validator.js

LearnPress – WordPress LMS Plugin for Create and Sell Online Courses, version 4.2.0. 11 lines.

- Page: https://pluginprobe.com/plugins/learnpress/4.2.0/code/assets/src/js/utils/email-validator.js
- Raw: https://pluginprobe.com/plugins/learnpress/4.2.0/raw/assets/src/js/utils/email-validator.js
- Modified: 2022-11-14T06:50:54+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/learnpress/4.2.0/code/assets/src/js/utils/email-validator.js#L10-L20`.

```javascript
/**
 * Validate is an email.
 *
 * @param email
 * @return {boolean}
 */
export default function isEmail( 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,}))$/;
	return re.test( email );
}

```
