We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Make Your Business Rules Cleaner With Fluent Validation
Summary
Description
☄️ Master the Modular Monolith Architecture: https://bit.ly/3SXlzSt
📌 Accelerate your Clean Architecture skills: https://bit.ly/3PupkOJ
🚀 Support me on Patreon to access the source code: https://www.patreon.com/milanjovanovic
Fluent Validation is a library for easily implementing rich validation rules. It also has support for asynchronous validation, which means you can test your business rules as part of your validation pipeline. I will show you how to validate a business rule in your validator by asynchronously calling the database.
Join my weekly .NET newsletter:
https://www.milanjovanovic.tech
Read my Blog here:
https://www.milanjovanovic.tech/blog
Subscribe for more:
https://www.youtube.com/@MilanJovanovicTech
Chapters
0:00 Implementing the Create Customer use case
3:25 Enforcing email uniqueness business rule
5:32 Adding FluentValidation and async validation
8:22 Registering FluentValidation with DI
9:03 Creating an endpoint for the use case
10:36 Running validation with IValidator
13:19 Enforcing unique constraints in the database
Translated At: 2025-03-13T18:08:05Z