Removed DB validations

pull/2/head
Sahat Yalkabov 2014-01-01 02:35:37 -05:00
parent 67905dc71e
commit a89959a2a6
1 changed files with 0 additions and 11 deletions

View File

@ -22,17 +22,6 @@ var userSchema = new mongoose.Schema({
}
});
userSchema.path('password').validate(function(password) {
if (this.provider) return true;
return password.length;
}, 'Password cannot be blank');
userSchema.path('username').validate(function(username) {
if (this.provider) return true;
return username.length;
}, 'Email cannot be blank');
userSchema.pre('save', function(next) {
var user = this;
var SALT_FACTOR = 5;