Fix display name requirements
This commit is contained in:
parent
5aeee0bc01
commit
24b36045ff
|
@ -69,10 +69,11 @@ class Account {
|
|||
}
|
||||
|
||||
static cleanCreateAccountFormData (formData) {
|
||||
var displayName = typeof formData.displayName !== 'undefined' ? formData.displayName.toString().trim() : '';
|
||||
return {
|
||||
email: formData.email.trim(),
|
||||
username: formData.username.toString().trim(),
|
||||
displayName: typeof formData.displayName !== 'undefined' ? formData.displayName.toString().trim() : 'A Bee',
|
||||
displayName: displayName.length > 0 ? displayName : 'A Bee',
|
||||
password: formData.password,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ function getSequelizeModels (sequelize) {
|
|||
allowNull: false,
|
||||
unique: true,
|
||||
validate: {
|
||||
len: [2, 32],
|
||||
len: [1, 32],
|
||||
},
|
||||
},
|
||||
passwordHash: {
|
||||
|
|
Loading…
Reference in New Issue