'Blazor - How to focus on the first invalid field in EditForm

I have a form in Blazor which utilized form validation, as described in the documentation.

When the user tries to submit the form, and it fails validation, I'd like to focus the user on the first invalid <input> field.

How can this be done in Blazor WebAssemby?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source