infinity-forge
Version:
11 lines • 605 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateEmail = validateEmail;
function validateEmail(value) {
var _a, _b;
if ((value === null || value === void 0 ? void 0 : value.length) > 0) {
return (_b = (_a = String(value)) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.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,}))$/);
}
return false;
}
//# sourceMappingURL=validate-email.js.map