fairybread icon indicating copy to clipboard operation
fairybread copied to clipboard

Implicit Validation of Collection-Type Models

Open benmccallum opened this issue 3 years ago • 1 comments

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

benmccallum avatar Jul 24 '21 15:07 benmccallum

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.

benmccallum avatar Sep 29 '21 17:09 benmccallum