FAQ KB0404123
Email
How can I set up regex validation for the Postal Code field in an Address question?
Symptom

Resolution

To setup an specific regex validation for the Postal Code in an Address question:

  1. Go to Manage > Administration > Data Import/Export > Export, search for Country-Specific Postal Code Validations, then click the Export button.
  2. Open the file with a text editor, and set the [regular expression] regex you want to validate the format of the accepted values for the Postal Code field.
    1. This expression must be entered in the fifth column in the file: you can use the first line in the file/the header to guide you.
    2. This must be done for each country separately; as you can see in the file, there's a specific line for each one of them.
    3. Make sure to use an expression to make it so the field accepts only 10 characters maximum.

Here is an example of file with custom postal validation for some countries:

Country,CountryCode,ISO,Note,Regex,ZipFormat
"Moldova","MD","MD",,"^(^MD\d{4})$|^(MD-\d{4}$)$","CCNNNN, CC-NNNN"
"Falkland Islands","FK","FK",,"^(^FIQQ\s1ZZ$)$","FIQQ 1ZZ"
"Montserrat","MS","MS",,"^[Mm][Ss][Rr]\s{0,1}\d{4}$","MSR 1110-1350"
"Singapore","SG","SG",,"^(^\d{6}$)$","NNNNNN"


See Also


Applies To

Supplier Lifecycle & Performance
Supplier Lifecycle & Performance > Supplier Lifecycle & Performance Registration

Terms of Use  |  Copyright  |  Security Disclosure  |  Privacy