Is there a way to resolve ValidationAttribute.IsValid() asynchronously?

David Thielen
3,211
Reputation points
Hi all; I have an IsValid() call that checks in registration to insure the user's email is not already in our user DB. To do so I need to query the database which is an async call. Is there any way to return a Task from IsValid or some other way return immediately and then later, when the query completes, then tell Blazor if the value is valid? thanks - dave
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,672 questions
Sign in to answer