I want to add form data to the database.
so it's not good to loading data for every input and checks from the
database.
I am using validation and when everything is ok then I connect to the
database for better performance :).
one Idea is to call the onError method into the onSubmit method. but I want
to know is a better way to handle this situation?

On Tue, Jun 29, 2021 at 8:11 PM Maxim Solodovnik <solomax...@gmail.com>
wrote:

> Maybe it would be better to perform checks during validation ?
>
> from mobile (sorry for typos ;)
>
>
> On Tue, Jun 29, 2021, 22:33 vahid ghasemi <vahidghasemi...@gmail.com>
> wrote:
>
> > Hello
> > How can I pass an error in an onSubmit method?
> > I have some errors that can detect in the onSubmit method.
> > I throw exceptions at end of the onSubmit method.
> > In the catch block, I call the error method, but after that, I expect to
> > don't go into the afterOnSubmit method, but he will go and I am getting
> > the wrong response.
> >
>

Reply via email to