validation.vin
Check a 17-character vehicle identification number and its check digit; enforced for North American VINs.
validateVin in TypeScript
1.0.0
py rs ts
17 tests
validation.uk-utr
Check an HMRC Unique Taxpayer Reference's modulus 11 check digit, accepting the K and spacing people type.
validateUkUtr in TypeScript
2.0.1
py rs ts
18 tests
validation.email
Is this a plausible email address? A documented, pragmatic subset of RFC 5322, not the full grammar.
isEmail in TypeScript
1.0.0
py rs ts
28 tests
validation.lei
Check a 20-character Legal Entity Identifier against its ISO 17442 / ISO 7064 MOD 97-10 check digits.
validateLei in TypeScript
1.0.0
py rs ts
14 tests
validation.iban
Check an IBAN against the ISO 13616 mod-97-10 checksum and the registered length for its country.
isIban in TypeScript
1.0.0
py rs ts
22 tests
validation.luhn
Check a digit string against the Luhn mod-10 checksum used by payment cards and many identifiers.
isLuhn in TypeScript
1.0.0
py rs ts
18 tests
validation.uk-ni-number
Check a UK National Insurance number's format and HMRC's disallowed prefix letters, and normalise it.
validateUkNiNumber in TypeScript
2.0.0
py rs ts
22 tests
validation.uk-postcode
Validate a UK postcode and normalise it to canonical upper case with one space before the inward code.
validateUkPostcode in TypeScript
2.0.0
py rs ts
26 tests
auth.validate-registration
Validate a sign-up form (email, password, name) in one call, with a message per field, in the browser and the API alike.
validateRegistration in TypeScript
1.0.0
py rs ts
14 tests
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
1.0.0
py rs ts
22 tests
validation.nhs-number
Check an NHS number's modulus 11 check digit and normalise it to ten digits.
validateNhsNumber in TypeScript
2.0.0
py rs ts
17 tests
validation.isbn
Check an ISBN-10 or ISBN-13 and convert between them; the normalised form is always the ISBN-13.
validateIsbn in TypeScript
1.0.0
py rs ts
19 tests
validation.uk-sort-code-account
Check a UK sort code and account number with the Vocalink/Pay.UK modulus rules, against a table you supply.
validateUkSortCodeAccount in TypeScript
3.0.0
py rs ts
64 tests
net.device-validate
Validate one network inventory entry: name, host, ports, optional MAC and subnet, with every problem listed.
validateDevice in TypeScript
1.0.0
py rs ts
17 tests
validation.uk-modulus-table
Parse Vocalink's VALACDOS.txt and SCSUBTAB.txt into the table UK sort code modulus checking needs.
parseUkModulusTable in TypeScript
1.0.0
py rs ts
28 tests
1.0.0
py rs ts
30 tests
auth.validate-login
Check a login form (email, password): the normalised email to look up, or a message for each field to fix.
validateLogin in TypeScript
1.0.0
py rs ts
11 tests
validation.bic
Check the format of a SWIFT/BIC code (8 or 11 characters) and split it into its parts.
validateBic in TypeScript
1.0.0
py rs ts
15 tests
validation.uk-company-number
Check a Companies House company number's format and prefix (SC, NI, OC, LP...) and zero-pad it to eight characters.
validateUkCompanyNumber in TypeScript
2.0.1
py rs ts
18 tests
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
1.1.0
py rs ts
19 tests
finance.ledger.journal-validate
Check a double-entry journal: debits equal credits, no zero or two-sided lines, one currency, well-formed account codes.
validateJournal in TypeScript
1.0.0
py rs ts
16 tests
validation.phone-e164
Normalise a phone number to E.164 (+447700900123) using a default country's trunk and dialling prefixes.
validatePhoneE164 in TypeScript
2.0.0
py rs ts
31 tests
auth.validate-password-change
Check a change-password form: current password given and correct, new one meeting the policy and different.
validatePasswordChange in TypeScript
1.0.0
py rs ts
15 tests
health.qrisk-inputs-validate Unreviewed
Check a QRISK3 cardiovascular risk input set against the calculator's published ranges; does not compute risk.
validateQriskInputs in TypeScript
1.0.1
py rs ts
29 tests
todo.item → validateDraft
The to-do item type (Todo, TodoDraft, Recurrence) and its validators, with a message per field.
validateDraft in TypeScript, one function of this group
1.0.0
py rs ts
51 tests
retail.coupon-validate
Check a coupon against a basket: dates, usage limits, eligible products and minimum spend, with reason codes.
validateCoupon in TypeScript
1.0.1
py rs ts
24 tests
net.hostname-validate
Check a host name against RFC 1123 and RFC 952 label rules and length limits, and normalise it.
validateHostname in TypeScript
1.0.0
py rs ts
26 tests
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
1.0.1
py rs ts
49 tests
logistics.hs-code-validate
Check the format of a commodity code: 6-digit HS, 8-digit CN or 10-digit TARIC/UK code, with chapter and heading checks.
validateHsCode in TypeScript
1.0.0
py rs ts
16 tests
net.mac-address
Validate a MAC address in colon, hyphen, Cisco dot or bare form and normalise it, with multicast and local bits.
validateMacAddress in TypeScript
1.0.0
py rs ts
22 tests
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
1.0.1
ts
21 tests
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
1.0.1
ts
40 tests
todo.import-csv → validateTodoCsv
Read todos from a CSV file (RFC 4180) as todo.export-csv writes it, checking every row, with row-numbered errors.
validateTodoCsv in TypeScript, one function of this group
1.1.0
py rs ts
59 tests
net.ipv4
Parse, format and check dotted-quad IPv4 addresses, refusing leading zeros, octal, hex and short forms.
A group of 3: parseIpv4, formatIpv4, isIpv4
1.0.0
py rs ts
39 tests
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
1.0.1
py rs ts
31 tests
health.nhs-number-format Unreviewed
Display an NHS number in the 3-3-4 format ("943 476 5919") after checking its modulus 11 check digit.
formatNhsNumber in TypeScript
1.0.1
py rs ts
13 tests
monitor.cert-expiry
How long a TLS certificate has left before its notAfter, and whether that is ok, a warning, critical or expired.
certExpiry in TypeScript
1.0.0
py rs ts
15 tests
auth.normalise-email
Trim an email address and lower-case its domain for storage and lookup, or null if it is not a plausible address.
normaliseEmail in TypeScript
1.0.0
py rs ts
12 tests
energy.price-cap
Ofgem energy price cap unit rate and daily standing charge for a fuel and payment method on a date (GB average).
priceCap in TypeScript
1.0.2
py rs ts
19 tests
finance.uk-bank-rate
Bank of England Bank Rate (base rate) in force on a date, from the Bank's official history since 2001.
ukBankRate in TypeScript
1.0.1
py rs ts
14 tests
logistics.freight-rate
Freight charge from a carrier's dated weight-break tariff for a zone, with the fuel surcharge in force on the ship date.
freightRate in TypeScript
1.0.1
py rs ts
26 tests
retail.shipping-rate
Delivery charge from a dated rate table by service, zone, chargeable weight and size, with a free-over threshold.
shippingRate in TypeScript
1.0.1
py rs ts
20 tests
auth.jwt
Sign, verify and decode HS256 JSON Web Tokens (RFC 7519): signature, algorithm and exp/nbf/iat checked with leeway.
A group of 3: signJwt, verifyJwt, decodeJwt
1.0.0
py rs ts
54 tests
react.form.date-input React ^19 · TypeScript only
Day, month and year boxes under one legend, with hint, error message and the boxes in error marked (GOV.UK date input).
DateInput in TypeScript
1.0.1
ts
14 tests
energy.climate-change-levy
Climate Change Levy on a business supply of electricity, gas, LPG or solid fuel, at the main rate in force on the date.
climateChangeLevy in TypeScript
1.0.2
py rs ts
20 tests
todo.parse-quick-add
Turn one typed line like "Pay rent tomorrow !high #home every month" into a todo draft.
parseQuickAdd in TypeScript
1.0.0
py rs ts
44 tests
auth.access-token
Issue an API's HS256 access token, read one from an Authorization header, and refuse revoked or superseded ones.
A group of 3: issueAccessToken, readAccessToken, confirmAccessToken
1.0.0
py rs ts
33 tests
finance.compound-interest
Compound interest accrued period by period in minor units, the way a statement is built.
compoundInterest in TypeScript
1.0.0
py rs ts
18 tests
finance.tax.vat-rate Unreviewed
Look up the VAT rate in force for a jurisdiction, category and date.
vatRate in TypeScript
1.2.2
py rs ts
25 tests
insurance.ipt Unreviewed
UK Insurance Premium Tax at the standard or higher rate in force on a date, added to or taken out of a premium.
insurancePremiumTax in TypeScript
1.0.2
py rs ts
23 tests
monitor.cert-check
A TLS certificate's expiry state as a check status: ok and warning are up, critical is degraded, expired is down.
certCheck in TypeScript
1.0.0
py rs ts
8 tests
health.news2 Unreviewed
NEWS2 early warning score from one set of observations: parameter scores, aggregate and RCP clinical risk band.
news2Score in TypeScript
1.0.1
py rs ts
45 tests
monitor.component-state
A status page component's state from its checks: operational, degraded, partial or major outage, or maintenance.
componentState in TypeScript
1.0.0
py rs ts
15 tests
banking.faster-payments-limit
Whether a Faster Payment fits the scheme maximum, the bank's per-payment limit and what is left of its daily limit.
fasterPaymentsCheck in TypeScript
1.0.1
py rs ts
24 tests
charity.reclaim-batch
Gift Aid claim totals for a period from donation records: donor lines, aggregated small gifts, tax due.
giftAidClaimBatch in TypeScript
1.0.1
py rs ts
12 tests
logistics.sscc
Build an 18-digit SSCC pallet label number from extension digit, GS1 company prefix and serial, with its check digit.
buildSscc in TypeScript
1.1.0
py rs ts
16 tests
telecoms.roaming-charge
Roaming charges for a trip abroad from a dated tariff table of zones: daily fees, data, calls and texts.
roamingCharge in TypeScript
1.0.1
py rs ts
16 tests
energy.carbon-emissions
kgCO2e from kWh or litres of a fuel, using the UK government GHG conversion factors for the year.
carbonEmissions in TypeScript
1.0.1
py rs ts
17 tests
hospitality.tourist-tax
Visitor levy (tourist tax) on an overnight stay: Edinburgh's 5%, Cardiff's per person per night, or a caller's own rule.
touristTax in TypeScript
1.0.1
py rs ts
30 tests
crypto.constant-time-equal
Compare two byte strings in time that does not depend on where they differ, for checking MACs and hashes.
constantTimeEqual in TypeScript
1.0.0
py rs ts
12 tests
finance.payment-terms-due-date
Invoice due date from payment terms: net N days, end of month, N days after month end, day N of next month.
paymentDueDate in TypeScript
1.0.0
py rs ts
26 tests
money.parse
Parse "£1,234.50" or "1.234,50 €" into integer minor units, strictly: no guessing, no rounding.
parseMoney in TypeScript
1.0.0
py rs ts
37 tests
net.port
Check a TCP/UDP port number and name the IANA service registered on it, with its system/user/dynamic range.
A group of 2: isPort, portService
1.0.0
py rs ts
30 tests
retail.promotion-apply
Apply BOGOF, 3-for-2, percent off, amount off and multibuy deals to a basket, best for the customer, allocated to lines.
applyPromotions in TypeScript
1.0.0
py rs ts
23 tests
auth.bearer-token
The token from an HTTP Authorization header of the form "Bearer <token>" (RFC 6750), or null if it has none.
parseBearerToken in TypeScript
1.0.0
py rs ts
18 tests
dates.days-between
Calendar days from one ISO date to another, signed: negative when the second date is earlier.
daysBetween in TypeScript
1.0.0
py rs ts
15 tests
dates.is-leap-year
Whether a year is a Gregorian leap year: every 4th, except centuries, except every 400th.
isLeapYear in TypeScript
1.0.0
py rs ts
15 tests
finance.ledger.trial-balance
Trial balance from journal lines: debit or credit balance per account, and proof that debits equal credits.
trialBalance in TypeScript
1.0.0
py rs ts
13 tests
react.form.textarea React ^19 · TypeScript only
A labelled multi-line text box with hint, error and an optional live character or word count (GOV.UK).
Textarea in TypeScript
1.0.1
ts
16 tests
todo.export-csv
Write todos as a CSV file (RFC 4180) with one column per field, for backups, spreadsheets and other apps.
exportCsv in TypeScript
1.0.0
py rs ts
14 tests
todo.merge
Merge imported todos into a list by id: an imported todo replaces the one with its id, new ids are appended.
mergeTodos in TypeScript
1.0.0
py rs ts
11 tests
todo.reschedule-recurrence
When a repeating todo's due date is moved by hand, move its series with it: the new date becomes the anchor.
rescheduleRecurrence in TypeScript
1.0.0
py rs ts
14 tests
banking.cheque-amount-words
The words and figures to write on a cheque: "One hundred and twenty pounds and fifty pence only", "£120.50".
chequeAmountWords in TypeScript
1.0.0
py rs ts
18 tests
dates.business-days-between
Working days between two dates, excluding weekends and a caller-supplied holiday list.
businessDaysBetween in TypeScript
1.0.0
py rs ts
26 tests
time.unix-to-iso
Unix time in seconds to an ISO 8601 UTC timestamp such as 2026-09-26T12:00:00Z, for years 0001 to 9999.
unixToIso in TypeScript
1.0.0
py rs ts
15 tests
todo.parse-tags
Read a tags box as typed, "#Home, work errands", into normalised tags: split on spaces and commas.
parseTags in TypeScript
1.0.0
py rs ts
12 tests
todo.recurrence-label
English text for a repeating todo's chip: "Every weekday", "Every 2 weeks on Monday", "Every month on the 31st".
recurrenceLabel in TypeScript
1.0.0
py rs ts
30 tests
todo.normalise-tags
Clean up tags as typed: trim, drop the #, lower-case slug form, drop empties and duplicates, keep the order.
normaliseTags in TypeScript
1.0.0
py rs ts
13 tests
dates.add-business-days
Move a date forward or back by working days, skipping weekends and a caller-supplied holiday list.
addBusinessDays in TypeScript
1.0.0
py rs ts
19 tests
finance.early-payment-discount
Early settlement discount available on a payment date under "2/10 net 30" style terms, and the amount to pay.
earlyPaymentDiscount in TypeScript
1.0.0
py rs ts
16 tests
monitor.http-check-result
Classify one HTTP probe as up, degraded or down, with a reason and message, from status, body and latency.
classifyHttpCheck in TypeScript
1.0.0
py rs ts
39 tests
todo.list
The to-do list reducer: add, edit, complete, remove, clear and reorder todos, each returning a new list.
A group of 8: addTodo, updateTodo, toggleTodo, removeTodo, clearCompleted, toggleAll, moveTodo, toggleAllMode
1.1.0
py rs ts
102 tests
health.gestational-age Unreviewed
Gestational age (weeks+days) and estimated due date from the last menstrual period by Naegele's rule, cycle-adjusted.
gestationalAge in TypeScript
1.0.1
py rs ts
20 tests
health.waiting-time Unreviewed
NHS England referral-to-treatment (RTT) wait in days and weekly bands, with the 18-week breach flag.
rttWaitingTime in TypeScript
1.0.1
py rs ts
18 tests
health.egfr Unreviewed
eGFR in mL/min/1.73 m² by the race-free CKD-EPI 2021 creatinine equation, from creatinine in µmol/L or mg/dL.
egfrCkdEpi2021 in TypeScript
1.0.1
py rs ts
25 tests
health.bmi Unreviewed
Adult body mass index (kg/m², 1 decimal place) and its NICE/WHO weight category.
bmi in TypeScript
1.0.1
py rs ts
22 tests
health.bsa Unreviewed
Body surface area in m² by the Mosteller and the DuBois & DuBois formulas, to 2 decimal places.
bodySurfaceArea in TypeScript
1.0.1
py rs ts
16 tests
health.dose-weight-based Unreviewed
Weight-based dose (per kg) capped at a maximum single dose and rounded to a measurable volume, in exact micro-units.
weightBasedDose in TypeScript
1.0.1
py rs ts
20 tests
health.appointment-slots Unreviewed
Bookable appointment slots from clinic sessions, a slot length, breaks and existing bookings.
appointmentSlots in TypeScript
1.0.1
py rs ts
20 tests
health.age-in-months Unreviewed
Age in completed months and days on a given date, for paediatric charts and doses; month ends handled like birthdays.
ageInMonths in TypeScript
1.0.1
py rs ts
19 tests
construction.retention
Retention held and released on a construction valuation: full rate, half at practical completion, none at the end.
retention in TypeScript
1.0.0
py rs ts
17 tests
construction.valuation
Interim valuation: gross value to date, retention, previous payments, amount due, VAT or reverse charge, and CIS.
interimValuation in TypeScript
1.0.0
py rs ts
16 tests
manufacturing.tolerance-check
Check a measurement against a nominal size and its upper and lower deviations, in whole micrometres.
checkTolerance in TypeScript
1.0.0
py rs ts
14 tests
monitor.heartbeat-check
A heartbeat's state as a check status for a status page: up, late as degraded, down as down, new as nothing yet.
heartbeatCheck in TypeScript
1.0.0
py rs ts
8 tests
monitor.maintenance-window
The scheduled maintenance window in force at a moment, if any, so alerts and uptime can be suppressed during it.
activeMaintenance in TypeScript
1.0.0
py rs ts
14 tests
payroll.minimum-wage-check Unreviewed
Check pay for a pay reference period against the minimum or living wage for age and apprenticeship.
minimumWageCheck in TypeScript
1.0.1
py rs ts
19 tests
react.form.password-field React ^19 · TypeScript only
A password input with a Show/Hide button and an optional live checklist of a password policy (GOV.UK password input).
A group of 2: passwordChecklist, PasswordField
1.0.1
ts
22 tests
monitor.heartbeat
Whether a cron job that pings on a schedule is new, up, late or down, from its last ping, period and grace time.
heartbeatStatus in TypeScript
1.0.0
py rs ts
14 tests
text.normalise-name
Tidy a personal name: trim, collapse whitespace and title-case, with Mc, Mac, O', hyphen and van/de rules.
normaliseName in TypeScript
1.0.0
py rs ts
23 tests
legal.conflict-name-match Unreviewed
Fuzzy-match a name against existing clients and parties for a conflict check: normalised, token-sorted Jaro-Winkler.
conflictNameMatch in TypeScript
1.0.1
py rs ts
18 tests