Server-side verification means your server checks every piece of data it receives before it uses it, whatever the browser already checked. A user can't switch it off, which makes it the check your app's security depends on.
Why the browser's checks aren't enough
Client-side checks run in the user's browser: a required or maxlength attribute on an input, or a bit of JavaScript that turns a field red. They give quick feedback, so keep them. But the browser belongs to the user, and the user can change anything that runs in it.
Someone can delete the maxlength attribute in DevTools, turn JavaScript off, or skip the page altogether and send a request straight to your API:
curl -X POST https://example.com/signup \
-H "Content-Type: application/json" \
-d '{"name":"","email":"nope","password":"1"}'That request never touched your form, so none of its checks ran. The server is the first and only code that sees it. The same goes for your mobile app, a script someone writes against your API, or a bot: none of them have to use your front end.
So treat client-side checks as a convenience for honest users, and server-side checks as the rule for everyone.
What the server should check
Think of it as four layers, from the cheapest to the most specific.
Type and syntax
Wondering how this was made? How we make these