{
  "id": "forms",
  "title": "Verified forms: inputs, address, money, dates and file uploads",
  "summary": "Accessible React form components whose rules are pure functions in every language: validated inputs, UK and international addresses, money, date pickers and file uploads, checked the same way in the browser and on the server.",
  "synonyms": [
    "forms",
    "form components",
    "form validation",
    "validated inputs",
    "input validation",
    "address form",
    "postcode field",
    "money input",
    "currency input",
    "amount field",
    "amount input",
    "price field",
    "date picker",
    "date field",
    "file upload",
    "upload field",
    "attachments",
    "react forms",
    "accessible forms",
    "server-side validation"
  ],
  "apps": [
    "sign-up form",
    "checkout form",
    "address form",
    "payment amount form",
    "booking form with dates",
    "document upload form",
    "admin data entry",
    "government service form"
  ],
  "language": "typescript",
  "includes": [
    "forms-ui",
    "validation-basics"
  ],
  "includedBy": [],
  "caveats": [
    "The components are React 19 and TypeScript only; each one's check (form.*) is in TypeScript, Python and Rust, so validate the submission on the server with the same rules rather than trusting the browser.",
    "form.address checks the shape of an address and its postcode, not that it exists: a lookup against Royal Mail's PAF or another address service is network work and yours.",
    "The components are React 19 and TypeScript only; the helpers (form.*) and the validation they pair with are in every language."
  ],
  "sections": [
    {
      "key": "inputs",
      "title": "Validated inputs",
      "purpose": "Text, email and number inputs whose required, length, pattern and min/max rules are data, checked in the browser and again on the server.",
      "from": "forms",
      "members": [
        {
          "id": "form.validate-input",
          "tier": "core",
          "why": "Checks one value against InputRules with GOV.UK-style messages, in every language.",
          "section": "inputs",
          "from": "forms",
          "version": "1.0.0",
          "summary": "Check a text, email or number input: required, length, pattern and min/max, with GOV.UK messages.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "validateInput"
          ],
          "signatures": [
            "export function validateInput(value: string, rules: InputRules): InputCheck"
          ],
          "reference": "import { validateInput } from \"#fune/form.validate-input@^1\";",
          "url": "http://www.functionalweave.com/functions/form.validate-input"
        },
        {
          "id": "react.form.validated-input",
          "tier": "core",
          "why": "The input with those rules as attributes, its message shown and described to screen readers.",
          "section": "inputs",
          "from": "forms",
          "version": "1.0.0",
          "summary": "A text, email or number input that checks itself with form.validate-input and shows the error accessibly.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": false,
          "functions": [
            "ValidatedInput"
          ],
          "signatures": [
            "export function ValidatedInput(props: ValidatedInputProps): JSX.Element"
          ],
          "reference": "import { ValidatedInput } from \"#fune/react.form.validated-input@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.validated-input"
        },
        {
          "id": "text.pattern-match",
          "tier": "optional",
          "why": "The pattern attribute's regular expression, matched the same way in Python and Rust.",
          "section": "inputs",
          "from": "forms",
          "version": "1.0.0",
          "summary": "Does the whole value match an HTML pattern attribute? The same answer in a browser, Python and Rust.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "matchesPattern"
          ],
          "signatures": [
            "export function matchesPattern(pattern: string, value: string): boolean"
          ],
          "reference": "import { matchesPattern } from \"#fune/text.pattern-match@^1\";",
          "url": "http://www.functionalweave.com/functions/text.pattern-match"
        }
      ],
      "gaps": []
    },
    {
      "key": "address",
      "title": "Addresses",
      "purpose": "A UK address form, or an international one with each country's labels and postcode rules.",
      "from": "forms",
      "members": [
        {
          "id": "form.address",
          "tier": "core",
          "why": "Checks each field of an address and normalises it; UK postcodes by Royal Mail's rules.",
          "section": "address",
          "from": "forms",
          "version": "1.0.0",
          "summary": "Check a UK or international postal address form: required lines, lengths, country and postcode.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": true,
          "functions": [
            "validateAddress",
            "addressFormat"
          ],
          "signatures": [
            "export function validateAddress(address: Address): AddressCheck",
            "export function addressFormat(country: string): AddressFormat"
          ],
          "reference": "import { validateAddress, addressFormat } from \"#fune/form.address@^1\";",
          "url": "http://www.functionalweave.com/functions/form.address"
        },
        {
          "id": "react.form.address-fields",
          "tier": "core",
          "why": "The address lines, town, region, postcode and country under one legend, autocompleted.",
          "section": "address",
          "from": "forms",
          "version": "1.0.0",
          "summary": "A UK or international address form under one legend: each line labelled and autocompleted, checked by form.address.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": false,
          "functions": [
            "AddressFields"
          ],
          "signatures": [
            "export function AddressFields(props: AddressFieldsProps): JSX.Element"
          ],
          "reference": "import { AddressFields } from \"#fune/react.form.address-fields@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.address-fields"
        },
        {
          "id": "validation.uk-postcode",
          "tier": "optional",
          "why": "The UK postcode check on its own, for a postcode-only field.",
          "section": "address",
          "from": "forms",
          "version": "2.0.0",
          "summary": "Validate a UK postcode and normalise it to canonical upper case with one space before the inward code.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "validateUkPostcode"
          ],
          "signatures": [
            "export function validateUkPostcode(value: string): UkPostcode"
          ],
          "reference": "import { validateUkPostcode } from \"#fune/validation.uk-postcode@^2\";",
          "url": "http://www.functionalweave.com/functions/validation.uk-postcode"
        }
      ],
      "gaps": [
        {
          "key": "address-lookup",
          "text": "Finding the address from a postcode (Royal Mail PAF or a lookup API) is network work and yours.",
          "section": "address",
          "from": "forms"
        }
      ]
    },
    {
      "key": "money",
      "title": "Money",
      "purpose": "Amounts typed the way the person's locale writes them, held as integer minor units.",
      "from": "forms",
      "members": [
        {
          "id": "form.money-input",
          "tier": "core",
          "why": "Reads typed text as Money for a currency and locale, checks min and max, and writes it back.",
          "section": "money",
          "from": "forms",
          "version": "1.0.0",
          "summary": "Read a typed amount as minor units for its currency and locale, check min/max, and format it back.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": true,
          "functions": [
            "parseMoneyInput",
            "formatMoneyInput",
            "moneyInputFormat"
          ],
          "signatures": [
            "export function parseMoneyInput(text: string, currency: string, locale: string, rules: MoneyRules): MoneyInputCheck",
            "export function formatMoneyInput(amount: Money, locale: string): string",
            "export function moneyInputFormat(currency: string, locale: string): MoneyInputFormat"
          ],
          "reference": "import { parseMoneyInput, formatMoneyInput, moneyInputFormat } from \"#fune/form.money-input@^1\";",
          "url": "http://www.functionalweave.com/functions/form.money-input"
        },
        {
          "id": "react.form.money-field",
          "tier": "core",
          "why": "The amount input with its currency symbol and a decimal keyboard.",
          "section": "money",
          "from": "forms",
          "version": "1.0.0",
          "summary": "A money input with its currency symbol, locale separators and min/max, read and checked by form.money-input.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": false,
          "functions": [
            "MoneyField"
          ],
          "signatures": [
            "export function MoneyField(props: MoneyFieldProps): JSX.Element"
          ],
          "reference": "import { MoneyField } from \"#fune/react.form.money-field@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.money-field"
        },
        {
          "id": "money.format",
          "tier": "optional",
          "why": "Shows a stored amount with its symbol, outside the input.",
          "section": "money",
          "from": "forms",
          "version": "1.0.0",
          "summary": "Render a monetary amount as text, using the currency's real minor-unit precision.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "formatMoney"
          ],
          "signatures": [
            "export function formatMoney(amount: Money): string"
          ],
          "reference": "import { formatMoney } from \"#fune/money.format@^1\";",
          "url": "http://www.functionalweave.com/functions/money.format"
        }
      ],
      "gaps": []
    },
    {
      "key": "dates",
      "title": "Dates",
      "purpose": "Dates chosen in the browser's picker, or typed into day, month and year, as ISO dates with no time zone involved.",
      "from": "forms",
      "members": [
        {
          "id": "form.iso-date",
          "tier": "core",
          "why": "Checks a YYYY-MM-DD value against required, past/future and earliest/latest rules.",
          "section": "dates",
          "from": "forms",
          "version": "1.0.0",
          "summary": "Check a date picker value (YYYY-MM-DD) against required, past/future and min/max rules, timezone-safe.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "validateIsoDate"
          ],
          "signatures": [
            "export function validateIsoDate(value: string, label: string, required: boolean, rules: DateRules): IsoDateCheck"
          ],
          "reference": "import { validateIsoDate } from \"#fune/form.iso-date@^1\";",
          "url": "http://www.functionalweave.com/functions/form.iso-date"
        },
        {
          "id": "react.form.date-field",
          "tier": "core",
          "why": "The browser's date picker with min and max, labelled and described.",
          "section": "dates",
          "from": "forms",
          "version": "1.0.0",
          "summary": "A labelled date picker (<input type=\"date\">) with min and max, checked by form.iso-date, its error shown accessibly.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": false,
          "functions": [
            "DateField"
          ],
          "signatures": [
            "export function DateField(props: DateFieldProps): JSX.Element"
          ],
          "reference": "import { DateField } from \"#fune/react.form.date-field@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.date-field"
        },
        {
          "id": "form.date-parts",
          "tier": "optional",
          "why": "The same rules for a date typed as day, month and year.",
          "section": "dates",
          "from": "forms",
          "version": "1.0.1",
          "summary": "Check a date typed into day, month and year boxes, with GOV.UK's error messages and the boxes to mark in error.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "validateDateParts"
          ],
          "signatures": [
            "export function validateDateParts(parts: DateParts, label: string, rules: DateRules): DatePartsCheck"
          ],
          "reference": "import { validateDateParts } from \"#fune/form.date-parts@^1\";",
          "url": "http://www.functionalweave.com/functions/form.date-parts"
        },
        {
          "id": "react.form.date-input",
          "tier": "optional",
          "why": "Day, month and year boxes, GOV.UK's choice for a date people already know.",
          "section": "dates",
          "from": "forms",
          "version": "1.0.1",
          "summary": "Day, month and year boxes under one legend, with hint, error message and the boxes in error marked (GOV.UK date input).",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": false,
          "functions": [
            "DateInput"
          ],
          "signatures": [
            "export function DateInput(props: DateInputProps): JSX.Element"
          ],
          "reference": "import { DateInput } from \"#fune/react.form.date-input@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.date-input"
        }
      ],
      "gaps": []
    },
    {
      "key": "files",
      "title": "File uploads",
      "purpose": "Choose files in the browser, check them, and upload straight to object storage.",
      "from": "forms",
      "members": [
        {
          "id": "form.file-check",
          "tier": "core",
          "why": "Checks chosen files against accept, size and how-many rules, in the browser and before signing an upload URL.",
          "section": "files",
          "from": "forms",
          "version": "1.0.0",
          "summary": "Check files chosen in an upload field: accept types, size, empty files and how many, with GOV.UK messages.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": true,
          "functions": [
            "validateFiles",
            "acceptsFile",
            "formatFileSize"
          ],
          "signatures": [
            "export function validateFiles(files: readonly FileInfo[], rules: FileRules): FileCheck",
            "export function acceptsFile(accept: string, file: FileInfo): boolean",
            "export function formatFileSize(bytes: number): string"
          ],
          "reference": "import { validateFiles, acceptsFile, formatFileSize } from \"#fune/form.file-check@^1\";",
          "url": "http://www.functionalweave.com/functions/form.file-check"
        },
        {
          "id": "react.form.file-upload",
          "tier": "core",
          "why": "The file input with accept and multiple, listing the chosen files with their errors.",
          "section": "files",
          "from": "forms",
          "version": "1.0.0",
          "summary": "A labelled file upload field: accept, size and how-many checked by form.file-check, the chosen files listed with errors.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": false,
          "functions": [
            "FileUpload"
          ],
          "signatures": [
            "export function FileUpload(props: FileUploadProps): JSX.Element"
          ],
          "reference": "import { FileUpload } from \"#fune/react.form.file-upload@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.file-upload"
        },
        {
          "id": "storage.signed-url",
          "tier": "optional",
          "why": "Signed PUT and GET URLs, so the bytes go straight to S3 or Google Cloud Storage (an integration).",
          "section": "files",
          "from": "forms",
          "version": "1.0.0",
          "summary": "Signed URLs for a browser to upload a file straight to S3 or Google Cloud Storage, and to download it.",
          "status": "stable",
          "license": "MIT",
          "languages": [
            "typescript"
          ],
          "available": true,
          "kind": "integration",
          "integration": {
            "providers": [
              "s3",
              "gcs"
            ],
            "select": "STORAGE_PROVIDER",
            "secrets": [
              "S3_SECRET_ACCESS_KEY (s3)",
              "GCS_HMAC_SECRET (gcs)"
            ],
            "config": [
              "STORAGE_PROVIDER",
              "S3_BUCKET (s3)",
              "S3_REGION (s3)",
              "S3_ACCESS_KEY_ID (s3)",
              "S3_ENDPOINT (s3)",
              "GCS_BUCKET (gcs)",
              "GCS_HMAC_ACCESS_ID (gcs)"
            ]
          },
          "group": true,
          "functions": [
            "signUpload",
            "signDownload"
          ],
          "signatures": [
            "export function signUpload(key: string, contentType: string, expiresSeconds: number = 900): SignedUrl",
            "export function signDownload(key: string, expiresSeconds: number = 900, filename: string | null = null): SignedUrl"
          ],
          "reference": "import { signUpload, signDownload } from \"#fune/storage.signed-url@^1\";",
          "url": "http://www.functionalweave.com/functions/storage.signed-url"
        }
      ],
      "gaps": [
        {
          "key": "upload-progress",
          "text": "Progress bars, resumable and chunked uploads, and retrying a failed upload are yours.",
          "section": "files",
          "from": "forms"
        },
        {
          "key": "upload-scanning",
          "text": "Virus scanning and checking what a file really contains (not just its name and type) are yours.",
          "section": "files",
          "from": "forms"
        }
      ]
    },
    {
      "key": "errors",
      "title": "Errors",
      "purpose": "Tell people what to fix, and take them to it.",
      "from": "forms",
      "members": [
        {
          "id": "react.form.error-summary",
          "tier": "core",
          "why": "\"There is a problem\" box linking to each field in error, focused on arrival.",
          "section": "errors",
          "from": "forms",
          "version": "1.0.1",
          "summary": "A \"There is a problem\" box linking to each field in error, focused on arrival, built from a validator's fields (GOV.UK).",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": true,
          "functions": [
            "errorSummaryItems",
            "ErrorSummary"
          ],
          "signatures": [
            "export function errorSummaryItems(fields: Readonly<Record<string, string>>, order: readonly string[], targets: Readonly<Record<string, string>>): readonly ErrorSummaryItem[]",
            "export function ErrorSummary(props: ErrorSummaryProps): JSX.Element"
          ],
          "reference": "import { errorSummaryItems, ErrorSummary } from \"#fune/react.form.error-summary@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.error-summary"
        },
        {
          "id": "form.state",
          "tier": "optional",
          "why": "Values, touched fields and errors as a reducer, so messages show after a field is touched.",
          "section": "errors",
          "from": "forms",
          "version": "1.0.1",
          "summary": "A form's state as a pure reducer: values, touched fields, validator errors and the submit, for useReducer.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "group": true,
          "functions": [
            "initialFormState",
            "formReducer",
            "visibleErrors"
          ],
          "signatures": [
            "export function initialFormState(values: Readonly<Record<string, string>>): FormState",
            "export function formReducer(state: FormState, action: FormAction): FormState",
            "export function visibleErrors(state: FormState): Readonly<Record<string, string>>"
          ],
          "reference": "import { initialFormState, formReducer, visibleErrors } from \"#fune/form.state@^1\";",
          "url": "http://www.functionalweave.com/functions/form.state"
        }
      ],
      "gaps": []
    },
    {
      "key": "fields",
      "title": "Fields",
      "purpose": "Labelled, hinted inputs with their errors wired up for screen readers (React, TypeScript only).",
      "from": "forms-ui",
      "members": [
        {
          "id": "react.form.form-field",
          "tier": "core",
          "why": "Wires a label, hint and error message to one control by id.",
          "section": "fields",
          "from": "forms-ui",
          "version": "1.0.1",
          "summary": "Wire a label, hint and error message to one form control by id, the accessible way (GOV.UK form group pattern).",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": true,
          "functions": [
            "fieldIds",
            "FormField"
          ],
          "signatures": [
            "export function fieldIds(id: string, hasHint: boolean, hasError: boolean): FieldIds",
            "export function FormField(props: FormFieldProps): JSX.Element"
          ],
          "reference": "import { fieldIds, FormField } from \"#fune/react.form.form-field@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.form-field"
        },
        {
          "id": "react.form.text-field",
          "tier": "core",
          "why": "Single-line text input with hint, error, autocomplete, prefix and suffix.",
          "section": "fields",
          "from": "forms-ui",
          "version": "1.0.1",
          "summary": "A labelled single-line text input with hint, error message, autocomplete, prefix and suffix (GOV.UK text input).",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": false,
          "functions": [
            "TextField"
          ],
          "signatures": [
            "export function TextField(props: TextFieldProps): JSX.Element"
          ],
          "reference": "import { TextField } from \"#fune/react.form.text-field@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.text-field"
        },
        {
          "id": "react.form.button",
          "tier": "core",
          "why": "Primary, secondary or warning button that stays focusable while loading.",
          "section": "fields",
          "from": "forms-ui",
          "version": "1.0.1",
          "summary": "A form button in primary, secondary or warning style that stays focusable while loading (GOV.UK button).",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": false,
          "functions": [
            "Button"
          ],
          "signatures": [
            "export function Button(props: ButtonProps): JSX.Element"
          ],
          "reference": "import { Button } from \"#fune/react.form.button@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.button"
        },
        {
          "id": "react.form.textarea",
          "tier": "optional",
          "why": "Multi-line box with an optional live character or word count.",
          "section": "fields",
          "from": "forms-ui",
          "version": "1.0.1",
          "summary": "A labelled multi-line text box with hint, error and an optional live character or word count (GOV.UK).",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": false,
          "functions": [
            "Textarea"
          ],
          "signatures": [
            "export function Textarea(props: TextareaProps): JSX.Element"
          ],
          "reference": "import { Textarea } from \"#fune/react.form.textarea@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.textarea"
        },
        {
          "id": "form.character-count",
          "tier": "optional",
          "why": "The \"You have 20 characters remaining\" message, in any language.",
          "section": "fields",
          "from": "forms-ui",
          "version": "1.0.1",
          "summary": "The GOV.UK character count message for a text box: characters or words left or over a limit, with a threshold.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "characterCount"
          ],
          "signatures": [
            "export function characterCount(text: string, limit: number, unit: CountUnit, threshold: number | null): CharacterCount"
          ],
          "reference": "import { characterCount } from \"#fune/form.character-count@^1\";",
          "url": "http://www.functionalweave.com/functions/form.character-count"
        },
        {
          "id": "react.form.select",
          "tier": "optional",
          "why": "Drop-down list with hint, error and an optional empty first option.",
          "section": "fields",
          "from": "forms-ui",
          "version": "1.0.1",
          "summary": "A labelled drop-down list with a hint, error message and an optional empty first option (GOV.UK select).",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": false,
          "functions": [
            "Select"
          ],
          "signatures": [
            "export function Select(props: SelectProps): JSX.Element"
          ],
          "reference": "import { Select } from \"#fune/react.form.select@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.select"
        },
        {
          "id": "react.form.password-field",
          "tier": "optional",
          "why": "Password input with Show/Hide and a live policy checklist.",
          "section": "fields",
          "from": "forms-ui",
          "version": "1.0.1",
          "summary": "A password input with a Show/Hide button and an optional live checklist of a password policy (GOV.UK password input).",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": true,
          "functions": [
            "passwordChecklist",
            "PasswordField"
          ],
          "signatures": [
            "export function passwordChecklist(policy: PasswordPolicy, check: PasswordCheck): readonly PasswordChecklistItem[]",
            "export function PasswordField(props: PasswordFieldProps): JSX.Element"
          ],
          "reference": "import { passwordChecklist, PasswordField } from \"#fune/react.form.password-field@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.password-field"
        }
      ],
      "gaps": []
    },
    {
      "key": "choices",
      "title": "Choices",
      "purpose": "Questions answered by picking.",
      "from": "forms-ui",
      "members": [
        {
          "id": "react.form.radio-group",
          "tier": "optional",
          "why": "Choose one of several radios, with hints, an \"or\" divider and inline yes/no.",
          "section": "choices",
          "from": "forms-ui",
          "version": "1.0.1",
          "summary": "Choose exactly one of several radios, with item hints, an \"or\" divider and inline yes/no (GOV.UK radios).",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": false,
          "functions": [
            "RadioGroup"
          ],
          "signatures": [
            "export function RadioGroup(props: RadioGroupProps): JSX.Element"
          ],
          "reference": "import { RadioGroup } from \"#fune/react.form.radio-group@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.radio-group"
        },
        {
          "id": "react.form.checkbox-group",
          "tier": "optional",
          "why": "Tick any of several checkboxes, with an exclusive \"None\".",
          "section": "choices",
          "from": "forms-ui",
          "version": "1.0.1",
          "summary": "A question answered by ticking any of several checkboxes, with item hints and an exclusive \"None\" (GOV.UK checkboxes).",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": true,
          "functions": [
            "toggleValue",
            "CheckboxGroup"
          ],
          "signatures": [
            "export function toggleValue(options: readonly CheckboxOption[], values: readonly string[], value: string, checked: boolean): readonly string[]",
            "export function CheckboxGroup(props: CheckboxGroupProps): JSX.Element"
          ],
          "reference": "import { toggleValue, CheckboxGroup } from \"#fune/react.form.checkbox-group@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.checkbox-group"
        },
        {
          "id": "react.form.checkbox",
          "tier": "optional",
          "why": "One checkbox such as \"I agree to the terms\".",
          "section": "choices",
          "from": "forms-ui",
          "version": "1.0.1",
          "summary": "One checkbox with its label beside it, such as \"I agree to the terms\" (GOV.UK single checkbox).",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": false,
          "functions": [
            "Checkbox"
          ],
          "signatures": [
            "export function Checkbox(props: CheckboxProps): JSX.Element"
          ],
          "reference": "import { Checkbox } from \"#fune/react.form.checkbox@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.checkbox"
        },
        {
          "id": "react.form.fieldset",
          "tier": "optional",
          "why": "Groups related inputs under a legend with a shared hint and error.",
          "section": "choices",
          "from": "forms-ui",
          "version": "1.0.1",
          "summary": "Group related inputs under a legend, with a hint and error message described to the whole group (GOV.UK fieldset).",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": false,
          "functions": [
            "Fieldset"
          ],
          "signatures": [
            "export function Fieldset(props: FieldsetProps): JSX.Element"
          ],
          "reference": "import { Fieldset } from \"#fune/react.form.fieldset@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.fieldset"
        }
      ],
      "gaps": []
    },
    {
      "key": "styles",
      "title": "Styles",
      "purpose": "A default look you can theme.",
      "from": "forms-ui",
      "members": [
        {
          "id": "react.form.styles",
          "tier": "optional",
          "why": "Optional stylesheet for the caps-* classes, themed by --caps-form-* properties.",
          "section": "styles",
          "from": "forms-ui",
          "version": "1.0.1",
          "summary": "An optional stylesheet for the react.form elements' caps-* classes, themed by --caps-form-* custom properties.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript"
          ],
          "available": true,
          "framework": {
            "name": "react",
            "range": "^19"
          },
          "group": false,
          "functions": [
            "formStyles"
          ],
          "signatures": [
            "export function formStyles(theme: FormTheme): string"
          ],
          "reference": "import { formStyles } from \"#fune/react.form.styles@^1\";",
          "url": "http://www.functionalweave.com/functions/react.form.styles"
        }
      ],
      "gaps": []
    },
    {
      "key": "contact",
      "title": "Contact details",
      "purpose": "Check and normalise a person's contact details before storing them.",
      "from": "validation-basics",
      "members": [
        {
          "id": "validation.email",
          "tier": "core",
          "why": "Is an email address plausible, by a documented subset of RFC 5322.",
          "section": "contact",
          "from": "validation-basics",
          "version": "1.0.0",
          "summary": "Is this a plausible email address? A documented, pragmatic subset of RFC 5322, not the full grammar.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "isEmail"
          ],
          "signatures": [
            "export function isEmail(value: string): boolean"
          ],
          "reference": "import { isEmail } from \"#fune/validation.email@^1\";",
          "url": "http://www.functionalweave.com/functions/validation.email"
        },
        {
          "id": "validation.phone-e164",
          "tier": "core",
          "why": "Normalises a phone number to +44… E.164 for a default country.",
          "section": "contact",
          "from": "validation-basics",
          "version": "2.0.0",
          "summary": "Normalise a phone number to E.164 (+447700900123) using a default country's trunk and dialling prefixes.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "validatePhoneE164"
          ],
          "signatures": [
            "export function validatePhoneE164(value: string, defaultCountry: string): PhoneE164"
          ],
          "reference": "import { validatePhoneE164 } from \"#fune/validation.phone-e164@^2\";",
          "url": "http://www.functionalweave.com/functions/validation.phone-e164"
        },
        {
          "id": "text.normalise-name",
          "tier": "optional",
          "why": "Tidies a typed name: spacing and title case with Mc, O' and hyphen rules.",
          "section": "contact",
          "from": "validation-basics",
          "version": "1.0.0",
          "summary": "Tidy a personal name: trim, collapse whitespace and title-case, with Mc, Mac, O', hyphen and van/de rules.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "normaliseName"
          ],
          "signatures": [
            "export function normaliseName(value: string): string"
          ],
          "reference": "import { normaliseName } from \"#fune/text.normalise-name@^1\";",
          "url": "http://www.functionalweave.com/functions/text.normalise-name"
        },
        {
          "id": "auth.normalise-email",
          "tier": "optional",
          "why": "Lower-cases an email's domain for storage and lookup.",
          "section": "contact",
          "from": "validation-basics",
          "version": "1.0.0",
          "summary": "Trim an email address and lower-case its domain for storage and lookup, or null if it is not a plausible address.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "normaliseEmail"
          ],
          "signatures": [
            "export function normaliseEmail(value: string): string | null"
          ],
          "reference": "import { normaliseEmail } from \"#fune/auth.normalise-email@^1\";",
          "url": "http://www.functionalweave.com/functions/auth.normalise-email"
        }
      ],
      "gaps": []
    },
    {
      "key": "bank",
      "title": "Bank details",
      "purpose": "Check payee and customer bank details before money moves.",
      "from": "validation-basics",
      "members": [
        {
          "id": "validation.iban",
          "tier": "core",
          "why": "Checks an IBAN's mod-97 checksum and its country's length.",
          "section": "bank",
          "from": "validation-basics",
          "version": "1.0.0",
          "summary": "Check an IBAN against the ISO 13616 mod-97-10 checksum and the registered length for its country.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "isIban"
          ],
          "signatures": [
            "export function isIban(value: string): boolean"
          ],
          "reference": "import { isIban } from \"#fune/validation.iban@^1\";",
          "url": "http://www.functionalweave.com/functions/validation.iban"
        },
        {
          "id": "validation.bic",
          "tier": "optional",
          "why": "Checks a SWIFT/BIC code's format and splits it.",
          "section": "bank",
          "from": "validation-basics",
          "version": "1.0.0",
          "summary": "Check the format of a SWIFT/BIC code (8 or 11 characters) and split it into its parts.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "validateBic"
          ],
          "signatures": [
            "export function validateBic(value: string): BicCheck"
          ],
          "reference": "import { validateBic } from \"#fune/validation.bic@^1\";",
          "url": "http://www.functionalweave.com/functions/validation.bic"
        },
        {
          "id": "validation.uk-sort-code-account",
          "tier": "optional",
          "why": "Checks a UK sort code and account number by the Vocalink modulus rules, against a table you supply.",
          "section": "bank",
          "from": "validation-basics",
          "version": "3.0.0",
          "summary": "Check a UK sort code and account number with the Vocalink/Pay.UK modulus rules, against a table you supply.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "validateUkSortCodeAccount"
          ],
          "signatures": [
            "export function validateUkSortCodeAccount(sortCode: string, accountNumber: string, table: UkModulusTable): UkSortCodeAccount"
          ],
          "reference": "import { validateUkSortCodeAccount } from \"#fune/validation.uk-sort-code-account@^3\";",
          "url": "http://www.functionalweave.com/functions/validation.uk-sort-code-account"
        },
        {
          "id": "validation.uk-modulus-table",
          "tier": "optional",
          "why": "Parses Vocalink's VALACDOS and SCSUBTAB files into that table.",
          "section": "bank",
          "from": "validation-basics",
          "version": "1.0.0",
          "summary": "Parse Vocalink's VALACDOS.txt and SCSUBTAB.txt into the table UK sort code modulus checking needs.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "parseUkModulusTable"
          ],
          "signatures": [
            "export function parseUkModulusTable(valacdos: string, scsubtab: string): UkModulusTable"
          ],
          "reference": "import { parseUkModulusTable } from \"#fune/validation.uk-modulus-table@^1\";",
          "url": "http://www.functionalweave.com/functions/validation.uk-modulus-table"
        }
      ],
      "gaps": []
    },
    {
      "key": "check-digits",
      "title": "Identifiers and check digits",
      "purpose": "Catch mistyped reference numbers by their check digits.",
      "from": "validation-basics",
      "members": [
        {
          "id": "validation.luhn",
          "tier": "optional",
          "why": "Luhn mod-10 check, for card numbers and many reference numbers.",
          "section": "check-digits",
          "from": "validation-basics",
          "version": "1.0.0",
          "summary": "Check a digit string against the Luhn mod-10 checksum used by payment cards and many identifiers.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "isLuhn"
          ],
          "signatures": [
            "export function isLuhn(value: string): boolean"
          ],
          "reference": "import { isLuhn } from \"#fune/validation.luhn@^1\";",
          "url": "http://www.functionalweave.com/functions/validation.luhn"
        },
        {
          "id": "validation.uk-company-number",
          "tier": "optional",
          "why": "Checks a Companies House number's format and prefix.",
          "section": "check-digits",
          "from": "validation-basics",
          "version": "2.0.1",
          "summary": "Check a Companies House company number's format and prefix (SC, NI, OC, LP...) and zero-pad it to eight characters.",
          "status": "stable",
          "license": "Apache-2.0 AND OGL-UK-3.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "validateUkCompanyNumber"
          ],
          "signatures": [
            "export function validateUkCompanyNumber(value: string): UkCompanyNumber"
          ],
          "reference": "import { validateUkCompanyNumber } from \"#fune/validation.uk-company-number@^2\";",
          "url": "http://www.functionalweave.com/functions/validation.uk-company-number"
        },
        {
          "id": "validation.lei",
          "tier": "optional",
          "why": "Checks a Legal Entity Identifier's check digits.",
          "section": "check-digits",
          "from": "validation-basics",
          "version": "1.0.0",
          "summary": "Check a 20-character Legal Entity Identifier against its ISO 17442 / ISO 7064 MOD 97-10 check digits.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "validateLei"
          ],
          "signatures": [
            "export function validateLei(value: string): LeiCheck"
          ],
          "reference": "import { validateLei } from \"#fune/validation.lei@^1\";",
          "url": "http://www.functionalweave.com/functions/validation.lei"
        },
        {
          "id": "validation.gtin",
          "tier": "optional",
          "why": "Checks an EAN/UPC/GTIN barcode number.",
          "section": "check-digits",
          "from": "validation-basics",
          "version": "1.1.0",
          "summary": "Check an EAN-8, UPC-A, EAN-13 or GTIN-14 barcode number against the GS1 mod-10 check digit.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "validateGtin"
          ],
          "signatures": [
            "export function validateGtin(value: string): GtinCheck"
          ],
          "reference": "import { validateGtin } from \"#fune/validation.gtin@^1\";",
          "url": "http://www.functionalweave.com/functions/validation.gtin"
        }
      ],
      "gaps": []
    },
    {
      "key": "masking",
      "title": "Displaying sensitive values",
      "purpose": "Show stored identifiers without exposing them.",
      "from": "validation-basics",
      "members": [
        {
          "id": "text.mask",
          "tier": "optional",
          "why": "Masks all but the last digits of a card, account or phone number.",
          "section": "masking",
          "from": "validation-basics",
          "version": "1.0.0",
          "summary": "Mask all but the last n characters of a card, account or phone number, optionally keeping separators.",
          "status": "stable",
          "license": "Apache-2.0",
          "languages": [
            "typescript",
            "python",
            "rust"
          ],
          "available": true,
          "group": false,
          "functions": [
            "mask"
          ],
          "signatures": [
            "export function mask(value: string, visible: number, maskChar: string, keepSeparators: boolean): string"
          ],
          "reference": "import { mask } from \"#fune/text.mask@^1\";",
          "url": "http://www.functionalweave.com/functions/text.mask"
        }
      ],
      "gaps": []
    }
  ],
  "gaps": [
    {
      "key": "address-lookup",
      "text": "Finding the address from a postcode (Royal Mail PAF or a lookup API) is network work and yours.",
      "section": "address",
      "from": "forms"
    },
    {
      "key": "upload-progress",
      "text": "Progress bars, resumable and chunked uploads, and retrying a failed upload are yours.",
      "section": "files",
      "from": "forms"
    },
    {
      "key": "upload-scanning",
      "text": "Virus scanning and checking what a file really contains (not just its name and type) are yours.",
      "section": "files",
      "from": "forms"
    },
    {
      "key": "submission",
      "text": "Posting the form, CSRF protection and putting the server's errors back into the fields.",
      "section": null,
      "from": "forms"
    },
    {
      "key": "rich-pickers",
      "text": "Custom calendar widgets, date ranges, and searchable country or currency pickers.",
      "section": null,
      "from": "forms"
    },
    {
      "key": "other-frameworks",
      "text": "Vue, Svelte, Angular or React Native components: only React is covered.",
      "section": null,
      "from": "forms-ui"
    },
    {
      "key": "multi-step-flows",
      "text": "Multi-page journeys: routing between steps, check-your-answers pages and saving progress.",
      "section": null,
      "from": "forms-ui"
    },
    {
      "key": "autocomplete",
      "text": "Autocomplete or combobox inputs (address finder, country picker).",
      "section": null,
      "from": "forms-ui"
    },
    {
      "key": "email-deliverability",
      "text": "Whether a mailbox exists (MX lookups, a confirmation email): validation.email checks the syntax only.",
      "section": null,
      "from": "validation-basics"
    },
    {
      "key": "vocalink-data",
      "text": "The Vocalink modulus tables themselves: download them from Pay.UK under its terms; caps parses them but does not ship them.",
      "section": null,
      "from": "validation-basics"
    }
  ],
  "counts": {
    "members": 43,
    "core": 17,
    "optional": 26,
    "unreviewed": 0,
    "deprecated": [],
    "unavailable": [],
    "missing": [],
    "gaps": 10
  },
  "coverage": {
    "method": "fune-coverage/1",
    "numerator": 17,
    "denominator": 27,
    "ratio": 0.6296,
    "percent": 63,
    "needs": {
      "core": 17,
      "gaps": 10,
      "weighted": false
    },
    "met": [
      "form.validate-input",
      "react.form.validated-input",
      "form.address",
      "react.form.address-fields",
      "form.money-input",
      "react.form.money-field",
      "form.iso-date",
      "react.form.date-field",
      "form.file-check",
      "react.form.file-upload",
      "react.form.error-summary",
      "react.form.form-field",
      "react.form.text-field",
      "react.form.button",
      "validation.email",
      "validation.phone-e164",
      "validation.iban"
    ],
    "unmet": [
      {
        "key": "address-lookup",
        "kind": "gap",
        "weight": 1,
        "reason": "gap"
      },
      {
        "key": "upload-progress",
        "kind": "gap",
        "weight": 1,
        "reason": "gap"
      },
      {
        "key": "upload-scanning",
        "kind": "gap",
        "weight": 1,
        "reason": "gap"
      },
      {
        "key": "submission",
        "kind": "gap",
        "weight": 1,
        "reason": "gap"
      },
      {
        "key": "rich-pickers",
        "kind": "gap",
        "weight": 1,
        "reason": "gap"
      },
      {
        "key": "other-frameworks",
        "kind": "gap",
        "weight": 1,
        "reason": "gap"
      },
      {
        "key": "multi-step-flows",
        "kind": "gap",
        "weight": 1,
        "reason": "gap"
      },
      {
        "key": "autocomplete",
        "kind": "gap",
        "weight": 1,
        "reason": "gap"
      },
      {
        "key": "email-deliverability",
        "kind": "gap",
        "weight": 1,
        "reason": "gap"
      },
      {
        "key": "vocalink-data",
        "kind": "gap",
        "weight": 1,
        "reason": "gap"
      }
    ],
    "deprecated": [],
    "unreviewed": [],
    "baseline": {
      "numerator": 0,
      "denominator": 27,
      "ratio": 0,
      "percent": 0,
      "what": "a typical hand-written app with no suite: none of the same needs is met by a verified capability, so 0 of the same denominator"
    },
    "computedAt": "2026-11-22T20:56:48.498Z",
    "language": {
      "language": "typescript",
      "numerator": 17,
      "ratio": 0.6296,
      "percent": 63,
      "notIn": []
    }
  },
  "warnings": [
    "The components are React 19 and TypeScript only; each one's check (form.*) is in TypeScript, Python and Rust, so validate the submission on the server with the same rules rather than trusting the browser.",
    "form.address checks the shape of an address and its postcode, not that it exists: a lookup against Royal Mail's PAF or another address service is network work and yours.",
    "The components are React 19 and TypeScript only; the helpers (form.*) and the validation they pair with are in every language."
  ],
  "url": "http://www.functionalweave.com/suites/forms",
  "owner": null
}
