Know and understand importance, characteristics and uses of appropriate validation including range check, character check, length check, type check, format check, presence check

Published by Patrick Mutisya · 14 days ago

ICT 0417 – Proofing: Validation Checks

15 Proofing

Proofing is the process of checking data entered into a computer system to ensure it meets the required standards before it is stored or processed further. Effective proofing reduces errors, improves data quality, and protects the integrity of information systems.

Why \cdot alidation Is Important

  • Prevents incorrect or incomplete data from being saved.
  • Reduces the need for costly data cleaning later.
  • Ensures compliance with business rules and legal requirements.
  • Improves user confidence and system reliability.

Common Types of \cdot alidation Checks

The following table summarises the main validation checks used in ICT applications, their purpose, typical characteristics and an example of each.

Check TypePurpose / What It TestsTypical CharacteristicsExample
Range CheckEnsures a numeric value falls within a permitted interval.Lower and upper limits are defined; inclusive or exclusive.Age must be between 0 and 120 years.
Character CheckConfirms that each character entered belongs to an allowed set.Alphabetic, numeric, alphanumeric, or specific symbols.Postcode may contain only letters and digits (e.g., “SW1A 1AA”).
Length CheckVerifies that the number of characters entered meets minimum and/or maximum limits.Exact length, minimum length, maximum length.Phone number must be exactly 10 digits.
Type CheckEnsures the data type matches the expected type (numeric, text, date, etc.).Conversion to the required type is attempted; failure triggers an error.Salary field must be a decimal number, not text.
Format CheckValidates that the overall pattern of the entry conforms to a predefined format.Often implemented with regular expressions.Email address must match the pattern user@domain.tld.
Presence Check (Required Field)Ensures that a field is not left blank when it is mandatory.Simple non‑empty test; may be combined with other checks.Username field cannot be empty during registration.

How \cdot alidation Works – Step‑by‑Step Process

  1. Identify the data element to be validated.
  2. Determine which checks are applicable (e.g., a date field may need type, range and format checks).
  3. Define the validation rules (limits, patterns, required status).
  4. Implement the checks in the application (client‑side, server‑side, or both).
  5. Provide clear feedback to the user when a check fails.
  6. Allow correction and re‑submission until all checks pass.

Practical Example – Student Registration Form

Consider a simple web form used to register students for a course. The following validation rules might be applied:

  • Student ID: Presence check, length check (exactly 8 characters), character check (numeric only).
  • Date of Birth: Type check (date), range check (must be between 01‑01‑1900 and today), format check (DD/MM/YYYY).
  • Email: Presence check, format check (standard email regex).
  • Phone Number: Length check (10 digits), character check (numeric only).

Benefits of Using Multiple Checks Together

Combining several validation types creates a robust defence against incorrect data. For instance, a presence check ensures the field is not empty, a type check guarantees the data can be interpreted correctly, and a range check confirms the value lies within acceptable limits.

Common Pitfalls to Avoid

  • Relying solely on client‑side validation – server‑side checks are essential for security.
  • Providing vague error messages – users need specific guidance (e.g., “Enter a number between 1 and 100”).
  • Hard‑coding limits that may change – use configurable parameters where possible.
  • Neglecting localisation – date and number formats differ between regions.

Suggested Diagram

Suggested diagram: Flowchart showing the sequence of validation checks (presence → type → length → range → format → character) and the feedback loop to the user.

Key Take‑aways

  1. Validation protects data integrity and reduces errors.
  2. Each check type targets a specific aspect of the data.
  3. Effective proofing combines several checks and provides clear user feedback.
  4. Always implement validation on both client and server sides.