fairybread
fairybread copied to clipboard
Implicit Validation of Collection-Type Models
Got a report from Oisín Grehan and Nacer Dergal in Slack of a scenario where they weren't seeing the validator run.
Turns out they had an array arg where the inner type had the validator. e.g. [SomeInput]
Essentially this is "Implicit Validation of Collection-Type Models" as discussed in FluentValidation's docs here.
By default they don't handle it, but you can opt-in to handle it.
Context: Slack thread
This overlaps a little bit with discussions on #61 with Jeremy and implicitness opening a can of worms.
Plan is just to document that explicitness is key.
- [ ] Update readme
If anyone disagrees and would like to see this feature, let me know in the comments.