Field-level validation
Field validators handle simple validation for a single field. A validator definition defines a regular expression, which a data field must match to be valid. It can also define an optional input mask that provides a visual indication to the user of the data to enter in the field.
PolicyCenter field-level validation is not part of the class- or rule-based validation framework. Field-level validation does not involve Gosu business rules or classes. It is simply part of the PCF rendering framework.
The PolicyCenter rendering framework builds the user interface from sets of PCF files. During the rendering process, PolicyCenter performs any field-level checks that have been configured in the PCF files. For example, if you configure a specific field in a PCF as required, then if the user leaves that required field empty, the rendering framework generates a user error.
This type of field-level validation is independent of class- or rule-based validation. PolicyCenter performs this type of validation before policy validation and displays problems that occur at the PCF level before it runs policy validation or other processes.
For example, suppose that a user does not enter a value for the Fleet field on the (Submission wizard) Policy Info page. In this case, the rendering framework automatically generates a field-level validation error as the user attempts to move to the next step in the Submission wizard.
PolicyCenter generates the error message
text string from the MissingRequired
display key, substituting the field name for the {0} variable:
Java.Validation.MissingRequired = Missing required field "{0}"In this particular instance, you specify that the Fleet field in the
BALineDV.pcf PCF file is required. You do this by setting the
required property to true.
Guidewire recommends that you also implement most of the field validation checks as class-based validation as well. For example, implement a class-based validation method for the BA line that ensures that all required fields have been set.
See also
