For Blazor WebAssembly, I see many examples and articles that talk about data annotation validation, but no examples on how to use API's to validate a form.
I want to be able to do the following on submit:
- Check field value if it already exists on the server.
- If yes, then raise an error for that field, with the message ("This field value already exists.").
- Otherwise, call service to create or update value and redirect to a success page.
What is the ModelState counterpart for Blazor WebAssembly forms?