Reference

What is Form validation?

Form validation checks that input is acceptable before it is processed. Client-side validation is a convenience that improves the experience and catches typos early; server-side validation is the actual security control, because anything sent from a browser can be modified before it arrives.

Also called: client-side validation · server-side validation

The rule

Validate on the client for speed and helpfulness. Validate on the server for correctness and security. A form that only validates in the browser is not validated at all — it is decorated.

What good error handling looks like

  • Errors shown next to the field, in text, not only as a colour change
  • The message says what to do, not that something is invalid
  • No layout shift when the message appears, so the button does not move under a thumb
  • Entered data preserved on error — losing a completed form is how enquiries are lost
  • Errors announced to assistive technology via a live region

The mobile detail that costs conversions

Correct input types and autocomplete attributes, so the right keyboard appears and the browser can fill the form in one tap. It is a few attributes and it measurably changes completion rates.

Where this is covered in depth

A definition can only go so far. Why checkouts get abandoned, and which fixes belong in the build covers this properly — 2 minutes, free, no email required.

Who wrote this

Anas Bin Masud builds e-commerce sites and does technical SEO for businesses in the UK, Canada and Pakistan. These definitions come from client work rather than from a content brief — where an entry describes a mistake, it is usually one found on a real site. More about how I work.

Related terms

All 184 terms in the glossary →

Want this handled rather than explained?

Send the brief and you get a reply within one business day — either questions, or a scoping call. If your project is not something I should take on, I will say so then.

Response
Replies within 1 business day
Hours
Mon–Fri, 09:00–18:00 PKT — overlaps 05:00–14:00 UK, 00:00–09:00 US Eastern
Booking
Booking projects from October 2026
WhatsApp — opens a chat with +92 346 5348466 in a new tab