Archived
2

PUT finished

This commit is contained in:
VLE2FE
2020-05-14 15:36:47 +02:00
parent 81a7663f6c
commit 8315fc0d3b
11 changed files with 162 additions and 109 deletions

View File

@ -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()
})
)

View File

@ -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),