Blazored / FluentValidation

A library for using FluentValidation with Blazor
https://blazored.github.io/FluentValidation/
MIT License
597 stars 86 forks source link

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

Open icnocop opened 1 year ago

icnocop commented 1 year ago

Fixes #76

matthetherington commented 11 months ago

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?