Class-based validation

Class-based validation works on policy objects only. These objects must be part of the policy graph. PolicyCenter uses Gosu classes to define the validation logic. In these classes, you specify how and when to validate a particular object.

Note: The terms object and entity—while not absolutely identical—are used interchangeably throughout this topic. See Rules: A background for a description of each.

In the base configuration, Guidewire provides class-based validation only for policy objects. The objects are:

  • PolicyContact
  • Line-of-business entities
  • PolicyLocation
  • Policy-specific entities
  • PolicyPeriod
Important: Guidewire does not recommend, nor support, the use of class-based validation as a feedback mechanism for user action. Instead, if you need to provide that feedback, use confirmation dialog boxes and user-viewable exceptions. Class-based validation is not appropriate in all contexts, nor in all situations—use it carefully and thoughtfully.

Some features of class-based validation are:

  • PolicyCenter permits configuration of class-based validation on any data object, including those objects that you create by extending a base object. These objects do not need to implement the Validatable delegate.
  • PolicyCenter performs validation as designated by the appropriate Gosu class, and when it commits data to the database.
  • PolicyCenter displays validation error and warning messages in the user interface only if they apply to the validation level of the given context.

See also