superstruct icon indicating copy to clipboard operation
superstruct copied to clipboard

Fixes #971 - nested coercion

Open kmannislands opened this issue 3 years ago • 0 comments

Started with a failing test per @yss14's example in the ticket

Tried implementing an entries generator per @ianstormtaylor's suggestion but it didn't seem to do the trick.

Seems @poyangliu was correct: the issue is that the coerce bit of context wasn't being propagated in the call to validate() in the run() method. Added it to the argument to validate though I'm not sure this is the correct approach. Perhaps coerce and mask should be optional members of Context in general?

Closes #971

kmannislands avatar Apr 01 '22 21:04 kmannislands