Configuring national field validation

Field validation in PolicyCenter generally relies on regular expressions and input masks to validate data that users enter in specific fields. Field validators define specific regular expressions and input masks. Sometimes, field validation varies by country. For example, many countries issue taxpayer IDs, but the validation rules for taxpayer IDs vary by country.

See also

About field validation

Field validators provide basic validation for data that users enter in specific fields.

  • Field validators apply only to the value in a single field.
  • Field validators do not enforce the uniqueness of values in that field.
  • Field validators generally ignore relationships between values in that field and values in other fields.

A field validator typically defines a regular expression, which is a pattern of characters and special symbols that a value entered in a text field must match to be valid. Optionally, field validators can define an input mask, which provides a visual indication to the user of the expected format for values to enter in the field.

Note: You cannot define an input mask for input of Japanese characters—katakana and hiragana.

You can configure national field validation for fields of data type LocalizedString only. In addition, any entity definition that contains localized string fields must have an additional field to store a country code associated with each entity instance. PolicyCenter applies national field validation based on the value of the country code associated with specific entity instances.

You configure field validation by editing various fieldvalidtors.xml files under the fieldvalidators folder:

  • You define global field validators once in the fieldvalidtors.xml file located in the root of the fieldvalidators folder.
  • You define national field validators in fieldvalidtors.xml files located in country-specific folders in the fieldvalidators folder.

See also