Skip to content

Commit

Permalink
Merge pull request #1 from martinbedouret/master
Browse files Browse the repository at this point in the history
Update password check
  • Loading branch information
martinbedouret authored Jan 8, 2018
2 parents 0d5cde9 + 53ac0d5 commit d7fdb65
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions api/models/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');


/**
Expand Down

0 comments on commit d7fdb65

Please sign in to comment.