A booking form accepts two perfectly valid dates, but the end comes before the start. Another form rejects a customer's name because it contains an apostrophe. Both screens have validation. Neither has the right rules.

Before accepting a business application, agree what each field means, which combinations are permitted and how someone can correct a rejected entry. A red border is not an acceptance criterion.

This guide offers a rule worksheet and a fictional booking example for that discussion. It is a planning framework, not a report of tests on a delivered application.

Separate field format from business rules

OWASP distinguishes syntax checks, such as an expected type or format, from semantic checks: whether a value makes sense for the operation. Its example includes checking that a booking's end date follows its start date.[2]

For a service-booking form, those are different questions:

  • Can the application interpret the entered date?
  • Is the selected end after the start under the agreed booking rules?
  • Is this service offered at the selected location?
  • Is the selected technician still available when the booking is saved?

The last two are proposed business requirements, not universal rules. A business may allow an unassigned booking or a waitlist. Decide that explicitly rather than letting a developer infer it from a dropdown.

Avoid a single requirement called “validate all fields”. Give each rule an owner who can explain why it exists. A useful rule names the condition, the permitted outcome and the correction the user can make.

Build a form validation rule worksheet

Use this worksheet for each important field or combination. The entries below are a fictional demonstration; they are not CodeDrawn Digital service policies.

Fictional booking validation rules — planning example, not tested
RuleProposed requirementRejection and recoveryEvidence to request
Customer nameRequired; accept the agreed writing systems and punctuation within a stated length limitExplain missing or excessive length; do not silently strip punctuationAccepted and rejected examples, including names with apostrophes
Visit datesBoth required; end must be after start for this exampleIdentify the date relationship and ask for a later endEqual dates, reversed dates and a permitted pair
Service choiceSubmitted identifier must belong to the permitted set for the selected locationAsk the user to choose an available serviceValid option and a manually altered identifier
Optional noteBlank allowed; maximum length must be specifiedState the limit and let the user shorten the noteBlank, boundary-length and over-limit values
AvailabilityRecheck the booking rule at the save boundaryDo not confirm a booking if its required availability check cannot completeA slot becoming unavailable after the form opens

Replace “stated length” and “permitted set” with your actual decisions before sign-off. Decide how length is measured for the application's supported text; do not assume that a visible character and a storage unit always mean the same thing.

Also define whether blank, omitted and explicitly cleared values mean the same thing. On an edit screen, an omitted optional field might mean “leave unchanged”, whereas an explicit empty value might mean “remove this note”. That is a contract to specify, not an implementation detail to discover after launch.

Require server-side validation before saving

Browser feedback can help people correct a form quickly, but it is not the enforcement boundary. OWASP advises server-side validation even when the browser checks the same fields, because client-side checks can be bypassed.[2]

Ask the developer to demonstrate a rejected request submitted without the ordinary form controls. A disabled dropdown or hidden field should not be the only thing preventing an invalid service identifier from reaching storage.

For rules that depend on changing records, require a design explanation as well as a screen demonstration. In the fictional booking example, “the slot was available when the page opened” is different from “the application safely reserved it”. Ask how the availability check and reservation remain consistent when another user is booking too. The appropriate transaction or concurrency mechanism depends on the application; this worksheet does not prove one is present.

Input validation also does not replace other controls. OWASP treats authorization, parameterized database queries and context-aware output encoding as separate defenses. A well-formed customer identifier does not establish permission to change that customer's booking.[2]

Write error messages that explain the correction

“Invalid input” gives a person almost nothing to work with. Prefer a message tied to the rule: “Choose an end date after the start date.” If the business permits same-day visits, write a different rule and message together.

W3C's explanation of WCAG 2.2 Success Criterion 3.3.3 says that, when an input error is automatically detected and a correction suggestion is known, it should be provided unless doing so would jeopardize the security or purpose of the content.[1]

For this planning exercise, ask for:

  • A message that identifies the field or relationship needing attention.
  • A useful correction when one is known, without exposing confidential details.
  • An agreed way to reach and associate errors with their fields.
  • Preservation of ordinary entered values when appropriate, so a person does not have to retype the whole form.
  • Separate wording for a rejected entry and an unavailable service.

That last distinction matters. “Choose another technician” says the submitted choice failed a known rule. “Availability could not be checked; your booking has not been confirmed” describes a dependency failure under this example's proposed policy. Do not disguise an outage as a typing mistake, or tell someone the booking succeeded without the corresponding result.

These are acceptance proposals, not a claim that following this article establishes accessibility conformance. Use the web application accessibility checklist to plan a broader review of the rendered form and its interaction behavior.

Test rejected entries as carefully as successful ones

Use synthetic records in an isolated test environment. Every case below is Not run; it describes evidence to request from the developer, not an observed result.

Proposed validation acceptance cases — Not run
CaseProposed expected resultEvidence to retain
Enter a permitted name containing an apostropheAccept it under the agreed name rules without removing the apostropheSubmitted value and stored value
Set end before startReject the booking, identify the relationship and preserve safe editable valuesError state and evidence no booking was created
Submit an unknown service identifier outside the UIServer rejects the request; no booking is createdRequest, response and resulting record check
Leave the optional note blankAccept it under the documented blank-value contractResulting record representation
Make the availability-check dependency unavailable during SaveShow the agreed unconfirmed state rather than successDependency condition and booking-state check
Correct the invalid date and resubmitAccept only when all required current checks passCorrected request and resulting record

Record the application revision, environment, relevant framework versions, test conditions and actual outcome. Keep private customer data and secrets out of the evidence. A screenshot of an error alone cannot show whether the application also wrote an unwanted record.

Turn the checklist into an acceptance brief

A useful validation brief is short enough to read but specific enough to test: accepted values, cross-field rules, enforcement points, correction messages and evidence for both acceptance and rejection.

For batch-file workflows, use the separate CSV import validation checklist. It addresses related delivery questions about imports; this worksheet focuses on interactive field rules and correction after rejection.

If you are scoping a business application, bring one important form and its rule worksheet to a project discussion. You can prepare a project brief. The site's helper lets a visitor request an email draft; it does not confirm app opening, sending or receipt. This article makes no delivery, price or outcome promise.

Sources

[1] W3C Web Accessibility Initiative, Understanding Error Suggestion — https://www.w3.org/WAI/WCAG22/Understanding/error-suggestion.html

[2] OWASP Cheat Sheet Series, Input Validation Cheat Sheet (official repository) — https://raw.githubusercontent.com/OWASP/CheatSheetSeries/master/cheatsheets/Input_Validation_Cheat_Sheet.md

Both sources checked 30 November 2026. W3C's page states updated 09 March 2026; its Understanding document explains the criterion and is not a complete conformance assessment. OWASP's repository is a living guidance source, not evidence of tests on an application.