Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect clientside validation #195

Open
darrenjlewington opened this issue Aug 25, 2023 · 1 comment
Open

Incorrect clientside validation #195

darrenjlewington opened this issue Aug 25, 2023 · 1 comment
Labels
Question Question about this project Triage Issue needs to be triaged

Comments

@darrenjlewington
Copy link

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

@darrenjlewington darrenjlewington added Question Question about this project Triage Issue needs to be triaged labels Aug 25, 2023
@darrenjlewington
Copy link
Author

I should note that property abc is a string, and property def is a bool.

Kind regards,

Darren

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Question about this project Triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant