mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-25 07:44:33 +03:00
Fix validation for empty emails
This commit is contained in:
parent
6e78c45c67
commit
415005e2f6
@ -77,6 +77,10 @@
|
|||||||
// fully compatible with RFC 2822. See
|
// fully compatible with RFC 2822. See
|
||||||
// {@link https://github.com/chriso/validator.js/issues/377} for
|
// {@link https://github.com/chriso/validator.js/issues/377} for
|
||||||
// details. Thus we need a custom validation method for emails.
|
// details. Thus we need a custom validation method for emails.
|
||||||
|
if (!email) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
var chunks = email.split('@');
|
var chunks = email.split('@');
|
||||||
|
|
||||||
if (chunks.length < 2) {
|
if (chunks.length < 2) {
|
||||||
|
Loading…
Reference in New Issue
Block a user