Client-side validation
Also called: Front-end validation
Checks that run in the app or browser before data is sent, to give the user quick feedback.
Definition
Client-side validation checks required fields, formats and lengths on the device, so users see mistakes immediately without waiting for the server. It improves the experience but can't be trusted: anyone can skip it by calling the API directly, editing the request or using an old app version. That's why the same rules must also exist on the server.
In practice
A sign up form shows "Enter an email like name@example.com" as soon as you leave the field, before anything is sent to the server.
Learn it in context
Lessons that use this term.
Related terms
- Server-side validationChecks the server runs on every request, no matter which app or tool sent it. The only validation you can trust.
- Input validationChecking that what the user typed is acceptable before the app uses it.
- Inline validationShowing a field's error right next to it as the user fills in the form, instead of only after submit.