We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
async void
No description provided.
The text was updated successfully, but these errors were encountered:
I was struggling to get async validation working.
RuleFor(x => x.FolderPath).MustAsync(ValidateFolderPath).WithMessage(o => "Invalid path.");
It's been working when changing the field's value but not when submitting the form.
The key is to change the code ValidationRequested event to run not async.
ValidationRequested
It's a little weird as the solution is to use sync Validate method of FluentValidation:
// Tell FluentValidation to validate the object ValidationResult result = Validator.Validate(EditContext.Model);
Sorry, something went wrong.
It's tricky in validation because none of the Blazor EditContext stuff is async, which is partly why I haven't started to tackle this yet.
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: