data | ||
composer.json | ||
dataset.json | ||
README.md |
Postal Dataset
This is a dataset for noccylabs/dataset holding postal code patterns for validating postal codes.
Datasets
postalcode
Field | Type | Description |
---|---|---|
iso |
string | The ISO 2-letter country code |
format |
array | Valid formats, see below |
regex |
string | Unguarded regex to validate against |
- The value in
format
is treated literal, except for the following characters:#
indicates a number,?
indicates a digit, and*
indicates either a number or digit. - The regex must be bounded, for example as
"<^".$regex."$>"
. This is done so that multiple expressions can be combined easily.