added required parameter range
This commit is contained in:
@ -153,13 +153,12 @@ export class ValidationService {
|
||||
max: Joi.number(),
|
||||
|
||||
type: Joi.string()
|
||||
.valid('array')
|
||||
.valid('string', 'number', 'boolean', 'array'),
|
||||
|
||||
required: Joi.boolean()
|
||||
})
|
||||
.oxor('values', 'min')
|
||||
.oxor('values', 'max')
|
||||
.oxor('type', 'values')
|
||||
.oxor('type', 'min')
|
||||
.oxor('type', 'max')
|
||||
.required()
|
||||
.validate(JSON.parse(data));
|
||||
if (error) {
|
||||
|
Reference in New Issue
Block a user