Overload for ShouldHaveChildValidator() test method, accepting an instance of the model to test conditionals

Given the following models and validation rules: //models public class Person { public string FirstName {get; set; } public string LastName {get; set;} public bool HasAddress {get; set;} public Add...

Id #7218 | Release: None | Updated: Jul 17 at 5:11 PM by pgaule | Created: Jul 17 at 5:03 PM by pgaule

Collection Validation design request

Hi, I have this object: class Person { public List<string> Names { get; set; } ... } and would like to define validation rule that validates each name on empty string, and outputs following mes...

Id #7217 | Release: None | Updated: Jun 9 at 2:17 PM by stevozilik | Created: Jun 9 at 2:17 PM by stevozilik

FluentValidation not working for a null property

I'm using FluentValidation with IDataErrorInfo, and I have a validator defined as follows: public class StsInfoValidator : AbstractValidator<StsInfo> { public StsInfoValidator() { RuleFor(x => ...

Id #7216 | Release: None | Updated: May 19 at 5:23 PM by mrichman | Created: May 19 at 5:23 PM by mrichman

FluentValidation. Contextual validators & ViewModel Reuse

Suppose the following situation: // [Validator(typeof(AddressForSupplierValidator))] <-- Cannot put both // [Validator(typeof(AddressForCompanyValidator))] <-- // But even if I skip both of them i...

Id #7215 | Release: None | Updated: Apr 13 at 8:29 AM by JeremyS | Created: Apr 2 at 12:24 PM by FrankyStark

Differrent between InclusiveBetween and ExclusiveBetween in FluentValidation ?

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 ...

Id #7213 | Release: None | Updated: Mar 9 at 10:57 AM by JeremyS | Created: Mar 9 at 3:26 AM by mithang

Non-Nullable Int Issue - missing model properties

Given the following viewmodel: [FluentValidation.Attributes.Validator(typeof(PersonModelValidator))] public class PersonViewModel { public string Name { get; set; } public int Age { get; set; }...

Id #7212 | Release: None | Updated: Mar 5 at 8:20 AM by JeremyS | Created: Mar 4 at 3:54 PM by jmalone30

FromURI action param being validated

Web Api 5.2.3, hosted in IIS using Owin.Host.SystemWeb We have a Web Api (5.2.3) controller action with the following signature which we want the request body to be validated by FluentValidation,...

Id #7211 | Release: None | Updated: Feb 25 at 11:23 AM by delimited | Created: Feb 25 at 9:02 AM by delimited

InclusiveBetween not included in documentation

InclusiveBetween is not listed in the documentation. I had to look at the source code to find the string format arguments. It was actually pretty easy to find, but hardly convenient.

Id #7210 | Release: None | Updated: Feb 3 at 8:19 AM by JeremyS | Created: Jan 30 at 9:47 PM by ceasterday

Adding rule dynamically doesn't work?

I have a Validator class that and it validates an object's properties. This works fine, Now I want to add an extra rule: public bool IsNumberUnique(Customer customer) { var result =...

Id #7209 | Release: None | Updated: Jan 29 at 2:13 PM by JeremyS | Created: Jan 29 at 12:10 PM by cryo75

Please fix REALLY BAD code in FluentValidation.Mvc5

FluentValidation.Mvc5 RangeFluentValidationPropertyValidator.cs StringLengthFluentValidationPropertyValidator.cs How can ANYONE know that the first "." is a truncation point in the message????...

Id #7208 | Release: None | Updated: Jan 27 at 8:15 AM by JeremyS | Created: Jan 25 at 11:22 AM by jonnybee