Repository URL to install this package:
|
Version:
3.10.6 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = isEmailValidForWhitelist;
/**
* Is validating inputs for the MultiEmailSelect component.
* We need to allow domains and sub domains starting with a @ here as well
* @param {String} string
*/
function isEmailValidForWhitelist(string) {
var emailRE = new RegExp(/^(.*)@((\[[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 emailRE.test(typeof string === 'string' && string || '');
}