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

index.ts
bind(input, '(999) 999-9999')
10 digits

US — SSN

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

US — ZIP+4

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

US — date (M/D/YYYY)

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

ISO 8601 — date, unpadded

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

Canada — postal code

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

Canada — SIN

index.ts
bind(input, '999 999 999')
9 digits

Germany — IBAN

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

Germany — VAT ID

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

Poland — postal code

index.ts
bind(input, '99-999')
5 digits