Closed floyd-may closed 7 years ago
And just so you know, I'm using this series of PRs as a case study for my KCDC talk on fluent APIs if it gets accepted 😸
The merge was bad, so I just force-pushed a reset of errorinfo back to where I could accept your first commit.
I like how OptionalMessagePropertyValidationContext takes care of that null check. Now to just put a bow on it and ship it!
Allright @michaellperry,
Hopefully this will get this thing whooped into shape. The thing that vexed me about the previous one is that you could tack on as many
.WithMessage(...)
calls as you wanted. The extension methods for the numeric and string specific validators now return this newOptionalMessagePropertyValidationContext
which dumps you back at aPropertyValidationContext
after a single.WithMessage(...)
. Should be doing a good job of making invalid states unrepresentable. LMK if it sucks 😄