FluentValidation icon indicating copy to clipboard operation
FluentValidation copied to clipboard

Passing parent model instead of nested type to resolve exception thrown by FluentValidation

Open icnocop opened this issue 1 year ago • 1 comments

Fixes #76

icnocop avatar Oct 03 '23 21:10 icnocop

This wouldn't work if a sub object property was changed.

Eg if a Customer has an Address, and Customer.Address.Line1 changed, then editContext.Model would be of type Customer, and it would try to validate Customer.Line1, which doesn't exist.

I've made a change in #205 that should fix the same issue, could you see if it works for your use case?

matthetherington avatar Dec 08 '23 13:12 matthetherington