Reputation: 25
How I can implement validation to my model, but not use attributes in this
class, because, this
class has some behavior of dependency on how to fill properties.
For example, if property IsDropDown
is true, I must validate only DropDownValue
else I must validate other properties.
Upvotes: 2
Views: 265
Reputation: 17424
Use FluentValidation
Read Steve Sanderson's Blog : Integrating FluentValidation with Blazor
And Chris Sainty's article : Using FluentValidation for Forms Validation in Blazor
Upvotes: 1