changed allowed characters for username
This commit is contained in:
parent
529cbb7115
commit
c137a0f610
@ -5,9 +5,9 @@ import IdValidate from './id';
|
|||||||
|
|
||||||
export default class UserValidate { // validate input for user
|
export default class UserValidate { // validate input for user
|
||||||
private static user = {
|
private static user = {
|
||||||
name: Joi.string() // TODO: check allowed characters
|
name: Joi.string()
|
||||||
.alphanum()
|
|
||||||
.lowercase()
|
.lowercase()
|
||||||
|
.pattern(new RegExp('^[a-z0-9-_.]+$'))
|
||||||
.max(128),
|
.max(128),
|
||||||
|
|
||||||
email: Joi.string()
|
email: Joi.string()
|
||||||
|
Reference in New Issue
Block a user