A
A
Alexander2021-05-20 18:12:57
Node.js
Alexander, 2021-05-20 18:12:57

Where is the best place to handle errors in SPA?

Hello, please tell me where is the best place to do field validation and handle errors?
I use reack-hook-form on the front, and express-validador on the back.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Yarkov, 2021-05-20
@axrising

Everywhere

S
Slava Rozhnev, 2021-05-20
@rozhnev

Validation of input fields should be performed on the front for better interactivity and in order to avoid unnecessary load on the server when processing obviously incorrect data, as well as on the server to prevent intruders who bypass validation at the front.
It is desirable that the rules are identical for the front and back

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question