filter fix
This commit is contained in:
parent
597a8f3084
commit
ed37ce6aeb
@ -209,7 +209,7 @@ export default class SampleValidate {
|
||||
if (/material\./.test(field)) { // select right validation model
|
||||
validator = MaterialValidate.outputV().append({
|
||||
number: Joi.string().max(128).allow(''),
|
||||
properties: Joi.alternatives().try(Joi.number(), Joi.string().max(128))
|
||||
properties: Joi.alternatives().try(Joi.number(), Joi.string().max(128).allow(''))
|
||||
});
|
||||
field = field.replace('material.', '').split('.')[0];
|
||||
}
|
||||
@ -218,7 +218,7 @@ export default class SampleValidate {
|
||||
value: Joi.alternatives()
|
||||
.try(
|
||||
Joi.number(),
|
||||
Joi.string().max(128),
|
||||
Joi.string().max(128).allow(''),
|
||||
Joi.boolean(),
|
||||
Joi.array()
|
||||
)
|
||||
|
Reference in New Issue
Block a user