Regional formats

Common regional formats built with bind(). These masks format input; “complete” means the expected character count is present, not that a checksum or identifier is valid — the date masks below never check that a month or day exists.

US — Phone

bind(input, '(999) 999-9999')10 digits

US — SSN

bind(input, '999-99-9999')9 digits

US — ZIP+4

bind(input, '99999-9999')5, or 9 with the +4 suffix

US — date (M/D/YYYY)

bind(input, '9{1,2}/9{1,2}/9{4}')month and day take one or two digits

ISO 8601 — date, unpadded

bind(input, '9{4}-9{1,2}-9{1,2}')type "2026-8-29" without padding

Canada — postal code

bind(input, 'Z9Z 9Z9', { tokens: { Z: { match: /[a-z]/i, transform: char => char.toUpperCase() } } })6 alphanumeric characters

Canada — SIN

bind(input, '999 999 999')9 digits

Germany — IBAN

bind(input, 'DE99 9999 9999 9999 9999 99')DE + 20 digits

Germany — VAT ID

bind(input, 'DE999999999')9 digits after the DE prefix

Poland — postal code

bind(input, '99-999')5 digits