Functional Weave
Code in TypeScript

Tagged validation

40 capabilities

auth.password-policy
Check a new password against a named policy (NIST SP 800-63B-4 by default): length, common passwords, name and email.
A group of 2: passwordPolicy, checkPassword
form.iso-date
Check a date picker value (YYYY-MM-DD) against required, past/future and min/max rules, timezone-safe.
validateIsoDate in TypeScript
react.form.date-field React ^19 · TypeScript only
A labelled date picker (<input type="date">) with min and max, checked by form.iso-date, its error shown accessibly.
DateField in TypeScript
form.date-parts
Check a date typed into day, month and year boxes, with GOV.UK's error messages and the boxes to mark in error.
validateDateParts in TypeScript
form.money-input
Read a typed amount as minor units for its currency and locale, check min/max, and format it back.
A group of 3: parseMoneyInput, formatMoneyInput, moneyInputFormat
react.form.money-field React ^19 · TypeScript only
A money input with its currency symbol, locale separators and min/max, read and checked by form.money-input.
MoneyField in TypeScript
form.file-check
Check files chosen in an upload field: accept types, size, empty files and how many, with GOV.UK messages.
A group of 3: validateFiles, acceptsFile, formatFileSize
react.form.error-summary React ^19 · TypeScript only
A "There is a problem" box linking to each field in error, focused on arrival, built from a validator's fields (GOV.UK).
A group of 2: errorSummaryItems, ErrorSummary
react.form.file-upload React ^19 · TypeScript only
A labelled file upload field: accept, size and how-many checked by form.file-check, the chosen files listed with errors.
FileUpload in TypeScript
validation.uk-vat-number
Check a UK VAT registration number against HMRC's mod-97 checksum, including the post-2010 9755 variant.
isUkVatNumber in TypeScript
validation.gtin
Check an EAN-8, UPC-A, EAN-13 or GTIN-14 barcode number against the GS1 mod-10 check digit.
validateGtin in TypeScript
todo.item
The to-do item type (Todo, TodoDraft, Recurrence) and its validators, with a message per field.
A group of 2: validateDraft, validateTodo
validation.vin
Check a 17-character vehicle identification number and its check digit; enforced for North American VINs.
validateVin in TypeScript
form.state TypeScript only
A form's state as a pure reducer: values, touched fields, validator errors and the submit, for useReducer.
A group of 3: initialFormState, formReducer, visibleErrors