Skip to content

Commit 8f1f97e

Browse files
committed
Fixed bug in fluent validation
1 parent 75f2a0d commit 8f1f97e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/TabBlazor.FluentValidation/FluentValidationValidator.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,12 @@ public async Task<bool> ValidateAsync(Action<ValidationStrategy<object>> options
4848
{
4949
CurrentEditContext.Validate();
5050

51-
if (!CurrentEditContext!.Properties.TryGetValue(
51+
if (CurrentEditContext!.Properties.TryGetValue(
5252
FluentValidationSubscription.PendingAsyncValidation, out var asyncValidationTask))
5353
{
54-
throw new InvalidOperationException("No pending ValidationResult found");
54+
await (Task<ValidationResult>)asyncValidationTask;
5555
}
5656

57-
await (Task<ValidationResult>)asyncValidationTask;
5857

5958
return !CurrentEditContext.GetValidationMessages().Any();
6059
}

0 commit comments

Comments
 (0)