#Set error when onSubmit fails

7 messages · Page 1 of 1 (latest)

inner lotus
#

Im desperately trying to make server validation work. I've tried to use formApi.fieldInfo.email.instance?.setErrorMap and formApi.setErrorMap inside onSubmit, but nothing seems to work.
How to consistenly set an error the onsubmit fails?

gloomy rain
inner lotus
#

Thanks.. The use case here is not to handle random server errors, it's to present actual errors correctly to the user. The current use case i have is to validate the uniqueness of an email address. I haven't looked into the async validators that much (the documentation is a bit lacking sadly)

formal mason
#

By providing an Endpoint that tells anonymous users if an entered E-Mail-Address is unique you're possibly giving away the information if a user with this address is registered on your app/site/service which could be missused.

inner lotus
formal mason
#

Let's say you are running some-shady-site.tld and I want to know if my colleague is registered there (I know their e-mail).

I go go your site, enter their mail and your endpoint will respond with this e-mail is not unique

Then I know that colleague is registered with your site, right?