validation.uk-postcode
Validate a UK postcode and normalise it to canonical upper case with one space before the inward code.
validate_uk_postcode in Python
2.0.0
py rs ts
26 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.
validate_journal in Python
1.0.0
py rs ts
16 tests
validation.bic
Check the format of a SWIFT/BIC code (8 or 11 characters) and split it into its parts.
validate_bic in Python
1.0.0
py rs ts
15 tests
validation.email
Is this a plausible email address? A documented, pragmatic subset of RFC 5322, not the full grammar.
is_email in Python
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.
validate_lei in Python
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.
is_iban in Python
1.0.0
py rs ts
22 tests
validation.uk-vat-number
Check a UK VAT registration number against HMRC's mod-97 checksum, including the post-2010 9755 variant.
is_uk_vat_number in Python
1.0.0
py rs ts
22 tests
validation.vin
Check a 17-character vehicle identification number and its check digit; enforced for North American VINs.
validate_vin in Python
1.0.0
py rs ts
17 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: password_policy, check_password
1.0.1
py rs ts
31 tests
auth.validate-login
Check a login form (email, password): the normalised email to look up, or a message for each field to fix.
validate_login in Python
1.0.0
py rs ts
11 tests
auth.validate-password-change
Check a change-password form: current password given and correct, new one meeting the policy and different.
validate_password_change in Python
1.0.0
py rs ts
15 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.
validate_registration in Python
1.0.0
py rs ts
14 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.
validate_date_parts in Python
1.0.1
py rs ts
49 tests
form.state TypeScript only
A form's state as a pure reducer: values, touched fields, validator errors and the submit, for useReducer.
Not available in Python
1.0.1
ts
40 tests
health.qrisk-inputs-validate Unreviewed
Check a QRISK3 cardiovascular risk input set against the calculator's published ranges; does not compute risk.
validate_qrisk_inputs in Python
1.0.1
py rs ts
29 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.
validate_hs_code in Python
1.0.0
py rs ts
16 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).
Not available in Python
1.0.1
ts
21 tests
todo.item
The to-do item type (Todo, TodoDraft, Recurrence) and its validators, with a message per field.
A group of 2: validate_draft, validate_todo
1.0.0
py rs ts
51 tests
validation.gs1-check-digit
Compute or check the GS1 mod-10 check digit of any GS1 key: GTIN, SSCC, GLN, GSRN, GDTI, GSIN and the rest.
A group of 2: gs1_check_digit, is_gs1_check_digit_valid
1.0.0
py rs ts
30 tests
validation.gtin
Check an EAN-8, UPC-A, EAN-13 or GTIN-14 barcode number against the GS1 mod-10 check digit.
validate_gtin in Python
1.1.0
py rs ts
19 tests
validation.isbn
Check an ISBN-10 or ISBN-13 and convert between them; the normalised form is always the ISBN-13.
validate_isbn in Python
1.0.0
py rs ts
19 tests
validation.luhn
Check a digit string against the Luhn mod-10 checksum used by payment cards and many identifiers.
is_luhn in Python
1.0.0
py rs ts
18 tests
validation.nhs-number
Check an NHS number's modulus 11 check digit and normalise it to ten digits.
validate_nhs_number in Python
2.0.0
py rs ts
17 tests
validation.phone-e164
Normalise a phone number to E.164 (+447700900123) using a default country's trunk and dialling prefixes.
validate_phone_e164 in Python
2.0.0
py rs ts
31 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.
validate_uk_company_number in Python
2.0.1
py rs ts
18 tests
validation.uk-modulus-table
Parse Vocalink's VALACDOS.txt and SCSUBTAB.txt into the table UK sort code modulus checking needs.
parse_uk_modulus_table in Python
1.0.0
py rs ts
28 tests
validation.uk-ni-number
Check a UK National Insurance number's format and HMRC's disallowed prefix letters, and normalise it.
validate_uk_ni_number in Python
2.0.0
py rs ts
22 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.
validate_uk_sort_code_account in Python
3.0.0
py rs ts
64 tests
validation.uk-utr
Check an HMRC Unique Taxpayer Reference's modulus 11 check digit, accepting the K and spacing people type.
validate_uk_utr in Python
2.0.1
py rs ts
18 tests