-
Notifications
You must be signed in to change notification settings - Fork 94
Closed
Description
So the example is here https://repl.it/repls/TemporalUnfoldedProcessor
const schema = {
distribution: {
type: 'array',
min: 1,
custom(val, errors) {
//I don't get this message below
console.log('distribution', val)
return val
},
items: {
type: 'number', convert: true,
positive: true
}
},
};
The custom key is not working. Also, I don't use your library directly, I use moleculer framework and get this error when I put 'custom' key on arrays. On everything else works just fine.
Error [TypeError]: Cannot read property 'call' of undefined
at Array.eval (eval at compileRule (\node_modules\fastest-validator\lib\validator.js:
234:16), <anonymous>:136:36)
at Validator.eval (eval at compile (\node_modules\fastest-validator\lib\validator.js:
176:19), <anonymous>:10:14)
at \node_modules\fastest-validator\lib\validator.js:192:19
at validateContextParams (\moleculer\src\validator.js:48:17)
Hormold
Metadata
Metadata
Assignees
Labels
No labels