diff --git a/common/models/user.js b/common/models/user.js index bcd08705..a51d512a 100644 --- a/common/models/user.js +++ b/common/models/user.js @@ -936,7 +936,7 @@ function emailValidator(err, done) { if (typeof value !== 'string') return err('string'); if (value === '') return; - if (!isEmail(value)) + if (!isEmail.validate(value)) return err('email'); } diff --git a/package.json b/package.json index 2692df9c..1b941ecf 100644 --- a/package.json +++ b/package.json @@ -47,10 +47,10 @@ "ejs": "^2.3.1", "express": "^4.14.0", "inflection": "^1.6.0", - "isemail": "^1.2.0", + "isemail": "^2.2.1", "loopback-connector-remote": "^3.0.0", "loopback-datasource-juggler": "^3.0.0", - "loopback-phase": "^1.2.0", + "loopback-phase": "^3.0.0", "nodemailer": "^2.5.0", "nodemailer-stub-transport": "^1.0.0", "serve-favicon": "^2.2.0",