Need help with FluentValidation?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

6.7K Stars 1.0K Forks Apache License 2.0 2.1K Commits 9 Opened issues


A popular .NET validation library for building strongly-typed validation rules.

Services available


Need anything else?

Contributors list


Full Documentation

A small validation library for .NET that uses a fluent interface and lambda expressions for building validation rules.

Get Started

FluentValidation can be installed using the Nuget package manager or the

dotnet add package FluentValidation

For ASP.NET Core integration: ``` dotnet add package FluentValidation.AspNetCore


Supporting the project

FluentValidation is developed and supported by @JeremySkinner for free in his spare time. If you find FluentValidation useful, please consider financially supporting the project via GitHub sponsors or OpenCollective which will help keep the project going 🙏.

Build Status

| | | | | ------- | ----- | ----- | |

| NuGet | Nuget | |
| NuGet | Nuget


using FluentValidation;

public class CustomerValidator: AbstractValidator { public CustomerValidator() { RuleFor(x => x.Surname).NotEmpty(); RuleFor(x => x.Forename).NotEmpty().WithMessage("Please specify a first name"); RuleFor(x => x.Discount).NotEqual(0).When(x => x.HasDiscount); RuleFor(x => x.Address).Length(20, 250); RuleFor(x => x.Postcode).Must(BeAValidPostcode).WithMessage("Please specify a valid postcode"); }

private bool BeAValidPostcode(string postcode) { // custom postcode validating logic goes here } }

var customer = new Customer(); var validator = new CustomerValidator(); ValidationResult results = validator.Validate(customer);

bool success = results.IsValid; IList failures = results.Errors;


Documentation can be found on the project site.

License, Copyright etc

FluentValidation has adopted the Code of Conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.

FluentValidation is copyright © 2008-2021 .NET Foundation, Jeremy Skinner and other contributors and is licensed under the Apache2 license.

.NET Foundation

This project is supported by the .NET Foundation.


This project is supported by JetBrains, who kindly provide licenses for their software, free of charge, to help with the development of this project.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.