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

[Bug] Method that triggers partial validation stops working after the first time _fluentValidationValidator?.Validate method runs #244

Closed
johanna-skylight opened this issue Jan 10, 2025 · 1 comment
Labels
Bug Something isn't working Triage Issue needs to be triaged

Comments

@johanna-skylight
Copy link

Describe the bug
Method that triggers partial validation stops working after the first time _fluentValidationValidator?.Validate method runs.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://blazored.github.io/FluentValidation/
  2. Click on Partial validation button and verify the console prints Partial validation result : False as expected.
  3. Enter values in the First Name and Last Name input fields (both populated) and click on Partial validation button and verify that the console does not print the expected message. The method that prints the message is not getting called.
  4. Remove the inputs in the First Name and Last Name input fields (both empty) and click on Partial validation button and verify that the console does not print the expected message. The method that prints the message is not getting called.
  5. If you blur manually from all the input fields and then click on Partial validation button, then the method gets properly called and the console prints Partial validation result : False as expected.

Expected behavior
The method that triggers the validation logic and all the code in it should always run when user clicks the Partial validation button and the console should always print the validation result.

Screenshots
Screenshot 2025-01-10 at 12 51 24 PM

Hosting Model (is this issue happening with a certain hosting model?):

Additional context
This also happens for full validations when using OnValidSubmit. The methods set there doesn't get properly call after first validation runs.

@johanna-skylight johanna-skylight added Bug Something isn't working Triage Issue needs to be triaged labels Jan 10, 2025
@johanna-skylight
Copy link
Author

I found the root cause of the issue and is not caused by this dependency. dotnet/aspnetcore#12919

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant