1
Vote

Differrent between InclusiveBetween and ExclusiveBetween in FluentValidation ?

description

        RuleFor(employee => employee.TaxCode).InclusiveBetween(5,20).WithMessage("TaxCode phải nằm trong 5-10!");
        RuleFor(employee => employee.TaxCode).ExclusiveBetween(5, 20).WithMessage("TaxCode phải nằm ngoài 5-10 !");

comments

JeremyS wrote Mar 9, 2015 at 10:57 AM

As the name suggests, the range is inclusive for InclusiveBetween, whilst the range is not inclusive for ExclusiveBetween.