Closed nornagon closed 8 years ago
@nornagon Hey Jeremy, this looks great! Thanks for the contribution. I left a couple minor comments, but let's take it forward.
I'd prefer a way to configure this on a per-parser/per-validator level, but I wasn't sure where the data about the set of format validators should go, given that the information needs to be available to both the parser (to check that the format is a valid one) and the validator (to know how to actually validate the data).
Yeah ... what we might be able to do is if this becomes a problem is allow configuration objects to be instantiated individually and injected into validator instances. We could just leave the global version around as well for backwards compatibility.
This probably isn't necessary quite yet though; I bet most users will only need a single configuration.
Done & rebased :)
@nornagon Thanks again!
Released as 0.10.0.
Usage:
I'd prefer a way to configure this on a per-parser/per-validator level, but I wasn't sure where the data about the set of format validators should go, given that the information needs to be available to both the parser (to check that the format is a valid one) and the validator (to know how to actually validate the data).
Fixes #38.