|
<< Click to Display Table of Contents >> Navigation: IMS version 23.1 > IMS Admin - User Guide 23. > System > Users > User Settings > SITEVALIDATOR_ZIPCODE_VALIDATION |
This section is about a setting for Zipcode validation for the site object
The Setting Name called SITEVALIDATOR_ZIPCODE_VALIDATION can be invoked in order to enforce required formats during data entry from the GUI for the Zipcode field.
There will be no zipcode validation when:
oThe UserSetting of SITEVALIDATOR_ZIPCODE_VALIDATION does not exist
oThe UserSetting exists, but the LayoutSetting value is null
oThe UserSetting exists, but the LayoutSetting has an empty list of values like: "[ ]"
There will be a zipcode validation when:
oThe UserSetting SITEVALIDATOR_ZIPCODE_VALIDATION exists with at least 1 object in the list
oSettingName: SITEVALIDATOR_ZIPCODE_VALIDATION
oUserId: CLIENT

Different multiple zipcode formats can be added for any required country. For a Zipcode verification to happen when a site object is created, the corresponding site's country name must be specified in the Layout Setting list. More than one object can exist in the Layout Setting field (comma separated).
The following is an example of the default Layout Setting in every IMS environment. This can be modified accordingly:
[
{
"Country": "Netherlands",
"ZipCode": "#### [A-Z][A-Z]"
}, {
"Country": "Netherlands",
"ZipCode": "####[A-Z][A-Z]"
}, {
"Country": "Netherland",
"ZipCode": "#### [A-Z][A-Z]"
}, {
"Country": "Netherland",
"ZipCode": "####[A-Z][A-Z]"
}
]
The Layout Setting must be in a JSON format.
When a new site is created - and the country of the city exists in the zipcode validator in the UserSettings, IMS checks if the format of the zip code is correct. If it is not, an error message will appear with the given format(s) from the UserSetting:
Zipcode Validation Errors
Error messages are shown when an IMS user creates a new or modifies an existing Site's zipcode, and the zipcode:
odoes not conform to a valid zipcode format as defined in the User Settings - first error message below - or
othe Layout Settings have been setup incorrectly with erroneous formats - last 4 error messages
|
User has typed in a zipcode that does not conform to the zipcode format in the User Settings |
|
Incorrect JSON formatted Layout Settings field |
|
Missing Zipcode property from one or more of the objects in the Layout Settings field |
|
Missing Country property from one or more of the objects in the Layout Settings field |