Fluent Validation 3.2 not working

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
hi,
     I am facing some problem in validating the expiration date in fluent validtion 3.2 using nop commerce 2.40. where  i am using greater than or equalsto it is not taking the validation for it. i am checking the validation for the month should not be less than the current month and i am using dropdownlist to select the month .

here is my code:

string month = DateTime.Now.Month.ToString();

RuleFor(x => x.ExpireMonth).GreaterThanOrEqualTo(month).WithMessage("invalid expiry date");

it is not executing this validation even if i select less than the current month..

help would be appreciated...
11 years ago
It doesn't work with this rule:


RuleFor(x=>x.CategoryId)
                .GreaterThan(0)
                .WithMessage(localizationService.GetResource("Admin..."));


Please help
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.