superstruct
superstruct copied to clipboard
Fixes #971 - nested coercion
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