Install the FluentValidation .NET library for validation. Below is our sample Contact class and its corresponding validator class. The validator class needs to inherit AbstractValidator<Contact> and define the validation rules in the constructor using the RuleFor method. Instantiate the validator class, and pass the object to be validated. Here we have passed incorrect values for … Continue…
Continue Reading Nishant Rana’s Article on their blog
FluentValidation – build strongly-typed validation rules in .NET
Install the FluentValidation .NET library for validation. Below is our sample Contact class and its corresponding validator class. The validator class needs to inherit AbstractValidator and define the validation rules in the constructor using the RuleFor method. Instantiate the validator class, and pass the object to be validated.
Blog Syndicated with Nishant Rana’s Permission
More About This Author
Array
- Dyn365CE1 October 2024Using Microsoft Copilot Studio to create Copilot for Teams channel with Dataverse as Knowledge source – Copilot / Dataverse
- Dyn365CE30 September 2024Use Copilot to generate knowledge articles from resolved cases – Dynamics 365 Customer Service
- Dyn365CE24 September 2024How to remove contact and customer validation on Cases– Dynamics 365
- Dyn365CE23 September 2024Use the new Associated Grid Control to display details of other tables in subgrids – Model-driven App / Dynamics 365