0

Im using FluentValidation to check if one date is greater than another, heres my rule

RuleFor(m => m.EndDate)
            .NotEmpty().WithMessage("End date is required")
            .GreaterThan(m => m.StartDate).WithMessage("End date must after Start date");

it works ok server side, but not clientside. I have other rules and they work ok, this is a required rule

 RuleFor(m => m.EmailSubject)
            .NotEmpty()
            .WithMessage("An email subject is required");

I get clientside validation here. Can anyone tell me where Im going wrong ? It seems pretty ok to me

proteus
  • 545
  • 2
  • 12
  • 36
  • the required rule works ok for EndDate, its just GreaterThan that wont – proteus Jul 12 '17 at 12:23
  • This one is old, but may still be valid : https://stackoverflow.com/questions/9380010/unobtrusive-client-validation-using-fluentvalidation-and-asp-net-mvc-lessthanore or https://stackoverflow.com/questions/18142489/how-to-validate-date-in-clientside-using-fluentvalidation – Raphaël Althaus Jul 13 '17 at 10:33

0 Answers0