PUT finished
This commit is contained in:
@ -27,10 +27,16 @@ export default class TemplateValidate {
|
||||
|
||||
min: joi.number(),
|
||||
|
||||
max: joi.number()
|
||||
max: joi.number(),
|
||||
|
||||
type: joi.string()
|
||||
.valid('array')
|
||||
})
|
||||
.oxor('values', 'min')
|
||||
.oxor('values', 'max')
|
||||
.oxor('type', 'values')
|
||||
.oxor('type', 'min')
|
||||
.oxor('type', 'max')
|
||||
.required()
|
||||
})
|
||||
)
|
||||
|
@ -5,7 +5,7 @@ import IdValidate from './id';
|
||||
|
||||
export default class UserValidate { // validate input for user
|
||||
private static user = {
|
||||
name: Joi.string()
|
||||
name: Joi.string() // TODO: check allowed characters
|
||||
.alphanum()
|
||||
.lowercase()
|
||||
.max(128),
|
||||
|
Reference in New Issue
Block a user