dev
dev

Reputation: 25

How to implement custom validation in Blazor

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

Answers (1)

agua from mars
agua from mars

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

Related Questions