Open darrenjlewington opened 1 year ago
Dear Jeremy,
I've just upgraded from Fluentvalidation 5.x to 8.x, as we're now using Mvc 5.
We have a rule like RuleFor(x => x. abc).NotEmpty().When(x => x.def).WithMessage("ghi");
The above rule is causing clientside validation attributes to be generated, but not with the message "ghi", but with the property name "abc".
My understanding was that a when clause would not generate clientside validation, and this is what I would like.
When I comment out the rule, then no clientside validation is being generated. So I think that rules out any other Issues?
Can you provide any insight into this please, as I've run out of things to try.
Thank you and kind regards,
Darren
I should note that property abc is a string, and property def is a bool.
Kind regards,
Dear Jeremy,
I've just upgraded from Fluentvalidation 5.x to 8.x, as we're now using Mvc 5.
We have a rule like RuleFor(x => x. abc).NotEmpty().When(x => x.def).WithMessage("ghi");
The above rule is causing clientside validation attributes to be generated, but not with the message "ghi", but with the property name "abc".
My understanding was that a when clause would not generate clientside validation, and this is what I would like.
When I comment out the rule, then no clientside validation is being generated. So I think that rules out any other Issues?
Can you provide any insight into this please, as I've run out of things to try.
Thank you and kind regards,
Darren