diff --git a/src/routes/validate/sample.ts b/src/routes/validate/sample.ts index 9c5ad0d..54f7bb4 100644 --- a/src/routes/validate/sample.ts +++ b/src/routes/validate/sample.ts @@ -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() )