Skip to content
Novus Examples
json2.1 KB

Form Validation Messages (JSON)

Sample wording for each constraint-validation failure, in a terse and a helpful variant, so message copy can be reviewed without wiring a real form first. Fictional product, fictional copy.

Preview — first 50 linesjson
{
  "schemaVersion": 1,
  "generatedBy": "generation/forms_p7.py",
  "note": "SAMPLE wording for form validation messages. Fictional product, fictional copy.",
  "messages": [
    {
      "rule": "valueMissing",
      "control": "text",
      "terse": "Enter a value",
      "helpful": "Enter your full name"
    },
    {
      "rule": "valueMissing",
      "control": "checkbox",
      "terse": "Tick this box",
      "helpful": "Confirm you have read the sample terms to continue"
    },
    {
      "rule": "typeMismatch",
      "control": "email",
      "terse": "Invalid email",
      "helpful": "Enter an email address in the form name@example.com"
    },
    {
      "rule": "typeMismatch",
      "control": "url",
      "terse": "Invalid URL",
      "helpful": "Enter a web address beginning with https://"
    },
    {
      "rule": "patternMismatch",
      "control": "text",
      "terse": "Wrong format",
      "helpful": "Enter the reference as NX- followed by four digits and two capitals"
    },
    {
      "rule": "tooShort",
      "control": "textarea",
      "terse": "Too short",
      "helpful": "Add at least 40 characters so we can understand the request"
    },
    {
      "rule": "tooLong",
      "control": "text",
      "terse": "Too long",
      "helpful": "Shorten this to 40 characters or fewer"
    },
    {
      "rule": "rangeUnderflow",
      "control": "number",
80 lines total — download for the full file.

Specifications

Kind
reference
Messages
12
Schema Version
1

What is a .json file?

JSON (JavaScript Object Notation) is a lightweight, text-based data-interchange format representing objects, arrays, strings, numbers, booleans, and null. It is language-independent, human-readable, and the dominant format for web APIs and configuration. It requires a single well-formed root value.

How to use this file

Use an example JSON file to test parsers and serializers, schema validation, Unicode and number-precision handling, and API request or response processing.

How to use this file for testing

“Form Validation Messages (JSON)” is a deterministic Novus Examples fixture for Form parsing, Form testing, JSON parsing. PDF AcroForms with documented fields and live HTML forms for testing form parsers and fillers.

Documented properties for this file: 12 messages. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.

Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such — expect parsers to fail loudly rather than silently accept them.

This form is fictional SAMPLE content for tooling tests (autofill, scrapers, PDF fillers). It is not an official government, bank, or clinic form. Open the HTML offline or fill the PDF in any viewer; the demo submit path never stores data.

Code examples

import json

with open("form-validation-messages.json") as f:
    data = json.load(f)
print(type(data), len(data))

Generated by generation/forms_p7.py. Free for any use, no attribution required — license.