ListInput async validation state in Svelte

Is it possible to change the validation state and error message for a ListInput asynchronously? For example, if a user enters an e-mail address, I want to not only validate that it is formatted properly, but I also want to check with my backend to see if it’s already registered. If it’s already registered, then I would like to make the input invalid and change the message to “Email already taken”.

use errorMessage and errorMessageForce props together to force making input invalid (after you did check it on backend)

1 Like