The validate method

Guidewire PolicyCenter provides a validate method that you can use to trigger validation on a number of important business entities. You can use this method any place that you can use Gosu, including user interface PCF pages, Gosu rules, and Gosu classes. For example:
  • entity.Account.validate()

The validate method returns a ValidationResult object. (PolicyCenter does not persist this object to the database.) You can use this object, for example, with the following base configuration Gosu function to display validation errors in the user interface:

gw.api.web.validation.ValidationUtil.showValidationErrorsOnCurrentTopLocation( ValidatableBean,
      ValidationResult, ValidationLevel )