From 53ac0d50ec73a274898b1691e7318dbc5129b728 Mon Sep 17 00:00:00 2001 From: martin bedouret Date: Mon, 8 Jan 2018 16:40:26 -0300 Subject: [PATCH] wip --- api/models/User.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/models/User.js b/api/models/User.js index db61c822..c8a66179 100644 --- a/api/models/User.js +++ b/api/models/User.js @@ -76,11 +76,11 @@ userSchema.path('username').validate(function (username) { return username.length; }, 'Username cannot be blank'); -//userSchema.path('password').validate(function (password) { -// if (this.skipValidation()) -// return true; -// return password.length && this._password.length; -//}, 'Password cannot be blank'); +userSchema.path('password').validate(function (password) { + if (this.skipValidation()) + return true; + return password.length; +}, 'Password cannot be blank'); /**