Merge pull request #40 in ~VLE2FE/definma-api from develop to master
* commit 'ed37ce6aebad19b8357b65d1fef570ec4cd6d747': filter fix
This commit is contained in:
commit
1c82d84928
@ -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