This project is based off the original FluentValidation by JeremySkinner.
This is a port to MVC6 RC2 working in both netcoreapp1.0
and net46
The FluentValidation.Mvc
project has a basic validation including jQuery unobtrusive validation.
This extension plugs directly into the MVC6 Validation framework with a single line of code in the Startup.cs
file.
Example:
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().AddFluentValidation();
}
The method AddFluentValidation
allows for specifying a FluentValidationModelValidatorProvider
and\or a custom IValidatorFactory
This package is available on Nuget and will remain until the official repository has full support for Mvc6 Rc2.
Install-Package FluentValidation.Mvc6 -Pre
jQuery Validators:
- Required
- Range (min, max)
- String Length
- Credit Card
- Email Address
- Regular Expressions
- Equal comparer