Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbedouret committed Jan 8, 2018
1 parent 0d5cde9 commit 53ac0d5
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 53ac0d5

Please sign in to comment.