email validations work, now on to username validations
This commit is contained in:
@ -3,15 +3,13 @@ var crypto = require('crypto');
|
||||
var mongoose = require('mongoose');
|
||||
|
||||
var userSchema = new mongoose.Schema({
|
||||
/*email: {
|
||||
email: {
|
||||
type: String,
|
||||
unique: true,
|
||||
lowercase: true,
|
||||
match: /^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$/
|
||||
},*/
|
||||
email: String,
|
||||
trim: true
|
||||
},
|
||||
password: String,
|
||||
|
||||
facebook: String,
|
||||
twitter: String,
|
||||
google: String,
|
||||
@ -283,13 +281,14 @@ var userSchema = new mongoose.Schema({
|
||||
picture: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
/*username: {
|
||||
},
|
||||
username: {
|
||||
type: String,
|
||||
default: '',
|
||||
unique: true,
|
||||
match: /^[a-zA-Z0-9_]+$/
|
||||
}*/
|
||||
lowercase: true,
|
||||
trim: true
|
||||
}
|
||||
},
|
||||
|
||||
resetPasswordToken: String,
|
||||
|
Reference in New Issue
Block a user