Skip to content

Nico-VanHaaster/FluentValidation.Mvc6

Repository files navigation

FluentValidation.Mvc6

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.

MVC6 RC2 Registration

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

Nuget Installation

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

About

Fluent Validation MVC6

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages