Archived
2

filter fix

This commit is contained in:
VLE2FE 2020-08-27 15:46:27 +02:00
parent 597a8f3084
commit ed37ce6aeb

View File

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