# Building Forms with Validation That Users Don’t Hate

- Link: https://bestwebdeveloper.org/form-validation-users-dont-hate/
- Published: 2026-10-05T17:00:00+00:00
- Author: Best Web Developer

Last updated: September 2026 · Reading time: 13 min · By the Best Web Developer 
team

![Form validation example with inline error messages, accessible labels and a Saudi
mobile number field](https://placehold.co/1200x630/f97d0a/ffffff/png?text=Form+Validation
+Users+Like)

Good validation feels like help, not punishment: clear labels, forgiving input and
errors that explain the fix.

Quick answer

Form validation users do not hate is forgiving, timely and specific. Validate after
a field loses focus rather than on every keystroke, accept common input formats 
and normalise them, explain exactly how to fix each error next to the field, never
clear what the user typed, and always repeat checks on the server. Make errors accessible
to screen readers.

Key takeaways

 * Validate on blur, then re-validate live once a field has shown an error, so users
   see the fix confirmed instantly.
 * Accept many formats (spaces, dashes, Arabic-Indic digits) and normalise them,
   instead of rejecting reasonable input.
 * Error messages should say what is wrong and how to fix it, next to the field,
   in plain language.
 * Client-side validation is for usability; server-side validation is for security
   and data integrity. You need both.
 * For Saudi forms, handle +966 mobile numbers, 10-digit national and Iqama IDs,
   Arabic names and RTL error placement.

## Why bad form validation costs you customers

Bad form validation costs customers because it turns a small mistake into a dead
end. A user who sees “Invalid input” in red, with their password field cleared, 
often leaves rather than tries again.

**Form validation** is the process of checking that data entered into a form is 
complete and correctly formatted before it is accepted, and telling the user how
to correct anything that is not. It happens in the browser for speed and on the 
server for safety.

Forms are where websites make money: checkouts, lead forms, bookings, account sign-
ups. In our audits, fixing validation behaviour is one of the cheapest ways to raise
completion rates. This guide covers the timing, wording, formats and accessibility
rules we apply, with specific examples for Saudi and bilingual forms.

Note: who this is for

This guide is for designers, developers and marketers who own forms. Code examples
are described in words so non-developers can use them as a specification, and developers
can find implementation details in [MDN Web Docs](https://developer.mozilla.org/en-US/).

---

## When to validate: timing rules for form validation

Timing decides whether validation feels helpful or hostile. The best default is 
to validate a field when the user leaves it, then switch to live checking once an
error is showing.

### Do not validate while the user is still typing

Showing “Invalid email” after the first character is the most common irritation.
The user has not finished; the form is scolding them for being mid-sentence. Wait
for the blur event, when focus leaves the field, before showing an error.

### Re-validate live once an error appears

After a field shows an error, check it on every change so the message disappears
as soon as the input becomes valid. This “reward early, punish late” pattern confirms
the fix instantly and reduces anxiety.

### Validate the whole form on submit

On submit, check every field, move focus to the first invalid one and show a summary
at the top listing each error as a link to its field. This matters for long forms
and screen reader users, who may not notice an inline message further down the page.

### Use async checks sparingly

Checks that call the server, such as “is this username taken?”, should run after
blur with a short debounce of around 300 to 500 ms, show a loading state and never
block typing. Rate-limit them to avoid account enumeration.

![Form validation timing diagram showing on-blur error, live re-validation and submit
summary](https://placehold.co/1200x675/14181d/fed7aa/png?text=Inline+Error+Timing)

Validate on blur, confirm fixes live and summarise errors on submit.

## How to write form validation messages people understand

Good error messages are specific, polite and actionable. They tell the user what
happened and exactly what to do next, in the language of the form.

 | Bad message | Better message | Why it works | 
 | Invalid input | Enter your email address, for example name@company.com | Explains the expected format | 
 | Error: field required | Enter your mobile number so we can confirm your booking | Explains why the field matters | 
 | Password does not meet requirements | Add at least one number (8 characters minimum) | Names the missing rule only | 
 | Invalid date | Choose a date after today | Describes the valid range | 
 | Phone number invalid | Enter a Saudi mobile number starting with 05 or +966 5 | Gives the local pattern |

### Rules we follow for error copy

 * Place the message directly below or beside the field, not only at the top of 
   the page.
 * Use an icon and text as well as colour, so the error is visible to colour-blind
   users.
 * Avoid blame words such as “wrong”, “illegal” or “invalid” where possible.
 * Show password rules before the user types, and tick them off as they are met.
 * Write Arabic messages natively; translated error strings often read as rude or
   confusing.

### Never destroy user input

When the server rejects a submission, return the form with every value still filled
in, except card security codes. Clearing a long form because one field failed is
the fastest way to lose a lead.

Highlight: the one-sentence test

Read each error message aloud to someone who has never seen the form. If they cannot
fix the problem from that sentence alone, rewrite it.

---

## Forgiving input, accessibility and our checklist

The best form validation prevents errors instead of reporting them. Accept flexible
input, normalise it quietly and use the right input types so mobile keyboards help
the user.

### Accept and normalise formats

 * **Phone numbers:** accept spaces, dashes, brackets and a leading +966 or 0, then
   store in E.164 format such as +9665XXXXXXXX.
 * **Digits:** convert Arabic-Indic digits (٠١٢٣٤٥٦٧٨٩) to Western digits before
   checking, because many Saudi users type them.
 * **Emails:** trim spaces and lowercase the domain, but do not reject valid addresses
   with plus signs or long domains.
 * **Names:** allow Arabic, Latin, hyphens and apostrophes, and never force a “first
   name, last name” split if a single full-name field works.
 * **Card numbers:** allow spaces and format them in groups as the user types.

### Use native input types and attributes

Setting type=”email”, type=”tel” and inputmode=”numeric” brings up the correct mobile
keyboard. The autocomplete attribute lets browsers fill names, addresses and one-
time codes automatically, which cuts effort dramatically on mobile.

### Accessibility requirements

[WCAG 2.2](https://www.w3.org/TR/WCAG22/) includes success criteria on error identification,
labels or instructions, error suggestion and redundant entry. In practice: every
field has a visible label, errors are linked to fields with aria-describedby, the
field is marked aria-invalid when it fails, and a live region or focus move announces
errors to screen readers.

Pro tip

Test complex validation patterns before shipping them. Our free [Regex Tester](https://bestwebdeveloper.org/tools/regex-tester/)
lets you check a Saudi mobile or ID pattern against real sample inputs, including
edge cases with spaces and Arabic-Indic digits.

### Checklist we use on every form

 1. Every field is necessary; remove anything sales or ops will not use.
 2. Labels are visible above fields, not placeholder-only.
 3. Required and optional fields are marked clearly.
 4. Validation runs on blur, re-validates live after an error and summarises on submit.
 5. Inputs accept common formats and normalise them.
 6. Server-side validation repeats every rule and sanitises all input.
 7. Errors are announced to screen readers and focus moves to the first error.
 8. Submit button shows a loading state and prevents double submission.

Illustrative case: a Dammam clinic booking form

**Challenge:** A clinic’s booking form rejected phone numbers with spaces or +966,
rejected Arabic-Indic digits, cleared all fields on error and validated the email
field on every keystroke. Completion was 38% of users who started it.

**What we did:** We reduced the form from 11 fields to 6, normalised phone numbers
and digits, moved validation to on-blur with live re-checking, rewrote errors in
Arabic and English, and added an accessible error summary. The work took three weeks
and cost about SAR 14,000.

**Result:** Form completion rose from 38% to 67% over the next two months, booking
requests grew by about 70%, and support calls from patients unable to book fell 
from roughly 40 to 9 per month.

## Key benefits of user-friendly form validation

Better validation raises conversions, improves data quality and reduces support 
load at the same time. These are the gains teams see most often.

 * **Higher completion rates:** fewer abandoned checkouts, sign-ups and lead forms.
 * **Cleaner data:** normalised phone numbers and emails reach CRMs and WhatsApp
   tools correctly.
 * **Lower support volume:** fewer customers call because a form would not submit.
 * **Accessibility compliance:** forms that work with screen readers and keyboards
   meet WCAG expectations.
 * **Better ad performance:** higher landing-page conversion lowers cost per lead.
 * **Stronger security:** consistent server-side checks block malformed and malicious
   input.

Highlight: where the money is

Checkout and lead forms are usually the last step before revenue. A ten-point lift
in completion there is often worth more than doubling top-of-funnel traffic.

---

## Form validation for websites in Saudi Arabia

Saudi forms need local formats, bilingual messages and RTL-aware layouts. Generic
validation libraries often get these wrong by default.

### Local data formats

 * **Mobile numbers:** Saudi mobiles start with 05 locally or +966 5 internationally,
   followed by eight digits.
 * **National ID and Iqama:** both are 10 digits; national IDs typically start with
   1 and resident Iqama numbers with 2.
 * **Addresses:** the Saudi National Address uses a building number, street, district,
   city, postal code and additional number; a short address code is also common.
 * **VAT numbers:** business forms for B2B invoicing under ZATCA FATOORA often collect
   a 15-digit VAT registration number.

### RTL and bilingual behaviour

In Arabic layouts, error icons and messages should align to the right, and phone
or ID fields often stay left-to-right inside an RTL page. Set dir=”ltr” on those
inputs so digits do not reorder. Keep Arabic and English messages equally clear.

### Privacy under the PDPL

The PDPL enforced by SDAIA requires a lawful basis and purpose for personal data.
Collect only what you need, explain why sensitive fields such as ID numbers are 
required, link to the privacy notice next to the submit button and avoid sending
raw form data to third-party analytics tools. Our [UI/UX design service](https://bestwebdeveloper.org/services/ui-ux-design/)
builds bilingual, PDPL-aware forms from the first wireframe.

> “A form is a conversation. Validation is the moment your website either listens
> or interrupts.”
> — Best Web Developer strategy team

## Form validation approaches compared

Teams usually combine native browser validation, a JavaScript library and server
checks. Each approach has strengths and limits.

 | Approach | Strengths | Limitations | Best use | 
 | Native HTML attributes (required, type, pattern) | No JavaScript, mobile keyboards, fast | Default messages are generic and styling is limited | Baseline for every form | 
 | Custom JavaScript on blur | Full control over timing and wording | Must be built accessibly | Lead and booking forms | 
 | Form library (React Hook Form, Zod, Yup) | Consistent rules, shared schemas | Adds bundle weight, needs careful setup | Apps and complex checkouts | 
 | Server-side validation | Secure, authoritative | Slower feedback alone | Always required | 
 | Async server checks | Catches taken usernames or bad codes early | Latency, abuse risk | Sign-up and coupon fields |

Highlight: share one set of rules

Where possible, define validation rules once in a shared schema used by both browser
and server. It prevents the classic bug where the browser accepts a value that the
server then rejects.

---

## Future trends in form UX and Vision 2030 digital services

Forms are getting shorter as browsers, passkeys and identity services do more of
the work. Validation will increasingly focus on confirming data rather than collecting
it.

 * **Passkeys and one-time codes:** fewer password fields, and less password validation
   to design.
 * **Autofill everywhere:** better browser autocomplete makes correct attributes
   more valuable.
 * **Verified identity:** in Saudi Arabia, national identity services such as Nafath
   are widely used for government and regulated services, reducing manual ID entry.
 * **Conversational forms:** chat and WhatsApp flows that validate each answer in
   context.

Vision 2030 has pushed Saudi government and private services to digital-first delivery,
and users now compare every form with the best government apps they use. That raises
expectations for clear, bilingual, forgiving forms across every sector.

## Frequently Asked Questions about form validation

### When should form validation errors appear?

Show a field’s error after the user leaves the field, not while they are typing.
Once an error is visible, re-check the field on every change so the message disappears
as soon as the value is valid. On submit, validate every field, move focus to the
first error and show a summary of all problems at the top.

### Is client-side form validation enough?

No. Client-side validation improves usability by giving fast feedback, but anyone
can bypass it by disabling JavaScript or sending requests directly. Server-side 
validation must repeat every rule, sanitise input and return clear errors. Treat
browser checks as a convenience and server checks as the real protection for your
data and systems.

### How do I write a good form error message?

Say what is wrong and how to fix it in one short, polite sentence placed next to
the field. Include an example or the expected format where useful, such as a sample
email or a Saudi mobile pattern. Avoid generic words like “invalid”, use an icon
as well as colour, and never clear the user’s input.

### How should a form validate Saudi mobile numbers?

Accept numbers typed as 05XXXXXXXX, 5XXXXXXXX, +9665XXXXXXXX or 009665XXXXXXXX, 
with or without spaces and dashes, and convert Arabic-Indic digits to Western digits
first. Then normalise to the international E.164 format for storage. Show an example
such as 05X XXX XXXX in the hint text, and keep the input left-to-right in Arabic
layouts.

### What makes form validation accessible?

Every field needs a visible label, and errors must be identified in text, not only
colour. Link each message to its field with aria-describedby, mark failing fields
with aria-invalid, announce errors through a live region or by moving focus, and
provide an error summary on submit. These steps support the WCAG 2.2 criteria on
error identification and suggestions.

### Should I use placeholder text instead of labels?

No. Placeholder text disappears when the user starts typing, which makes it hard
to remember what a field needs and harder to fix errors. Placeholders also often
fail contrast requirements. Use a visible label above each field and, if helpful,
a short hint below it. Placeholders can show an example format as a secondary cue.

### How many fields should a lead form have?

As few as your team will actually use. For most service lead forms, name, phone 
or email and a short message are enough; four to six fields is a common sweet spot.
Every extra field lowers completion. Ask for detailed information later in the sales
process, after the first contact is made.

## Conclusion: form validation that helps instead of blocks

Form validation users do not hate follows a few firm rules: validate on blur, confirm
fixes live, accept flexible input and normalise it, write specific error messages,
keep user data on error, make everything accessible and always repeat checks on 
the server.

For Saudi and bilingual sites, add local phone and ID formats, Arabic-Indic digit
handling, RTL-aware error layout and PDPL-minded data collection. Start with your
highest-value form, measure completion before and after, and expand the pattern 
across the site.

Losing leads at the form?

We audit and rebuild checkout, booking and lead forms for bilingual Saudi and UK
websites, with measurable completion targets. Send us the form URL and your current
completion rate.

 [Get a free consultation](https://bestwebdeveloper.org/contact/) [See pricing](https://bestwebdeveloper.org/pricing/)

**Tags:** form validation, form UX, error messages, accessible forms, WCAG 2.2, 
conversion optimisation, Arabic RTL forms, Saudi phone numbers, PDPL, Vision 2030
