Person class
class person
{
public string FirstName { get; set; }
public string FatherName { get; set; }
public string FamilyName { get; set; }
}
Each property of this class must be validated with this rule
RuleFor(x => x.FirstName).NotEmpty().Length(2, 50).WithMessage("*");
RuleFor(x => x.FatherName).NotEmpty().Length(2, 50).WithMessage("*");
RuleFor(x => x.FamilyName).NotEmpty().Length(2, 50).WithMessage("*");
I want to group these properties in one rule that validate each property through these validation rules (NotEmpty, Length)
How to do this in fluent validation ?