Open rahpuser opened 7 years ago
This looks like a bug to me, can you post the full stack trace please?
@tmpfs sure, sorry the delay.
TypeError: Cannot read property 'testField' of undefined
at iterator (projectRoot/node_modules/async-validate/lib/schema.js:256:34)
at run (projectRoot/node_modules/async-validate/lib/iterator.js:5:5)
at mapSeries (projectRoot/node_modules/async-validate/lib/iterator.js:18:12)
at onValidate (projectRoot/node_modules/async-validate/lib/schema.js:251:9)
at Fn.object [as test] (projectRoot/node_modules/async-validate/plugin/object.js:31:5)
at projectRoot/node_modules/async-validate/lib/schema.js:331:15
at run (projectRoot/node_modules/async-validate/lib/iterator.js:5:5)
at mapSeries (projectRoot/node_modules/async-validate/lib/iterator.js:18:12)
at Schema.validate (projectRoot/node_modules/async-validate/lib/schema.js:197:3)
at iterator (projectRoot/node_modules/async-validate/lib/schema.js:314:18)
at run (projectRoot/node_modules/async-validate/lib/iterator.js:5:5)
at mapSeries (projectRoot/node_modules/async-validate/lib/iterator.js:18:12)
at onValidate (projectRoot/node_modules/async-validate/lib/schema.js:251:9)
at Fn.object [as test] (projectRoot/node_modules/async-validate/plugin/object.js:31:5)
at projectRoot/node_modules/async-validate/lib/schema.js:331:15
at run (projectRoot/node_modules/async-validate/lib/iterator.js:5:5)
Hey,
Sorry for the slow response. I'm super busy building a house so may be a while before I get a chance to take a look at it. Any chance you want to give it a shot and submit a PR?
I have the same problem What time can solve?
Well not so soon, as my laptop just died and I am working on other stuff ;) If either of you can submit a PR with a failing test case it would speed things up.
Using the following description throws and unexpected error:
schema.validate({ testKey: {} }, (err, res) => {...
This throws the following error:
Cannot read property 'testField' of undefined
Is there something wrong in the descriptor or is there something else to configure to make this validation work?