Highlighting coverage term field with validation error
If class-based validation fails on a coverage term, you can highlight the coverage term and link the error message to that coverage term. The Result.reject method can highlight the coverage term. This approach works for coverage terms, schedules, and other abstract parameters.
Note: In the error message, the link can only navigate to locations on the main screen. It
cannot navigate to other tabs on the screen.
You can find an example in Personal Auto that highlights the Broadened
Collision coverage term when you select both Collision
and Collision - Limited Coverage coverages. In
PALineCoveragesValidator.gs, the Result.reject call in
the mutuallyExclusiveCoverages method specifies the path to the coverage
term:
Result.reject(vehicle.ID, vehicle, "PACollisionCov.PACollisionBroadTerm.Value",
ValidationLevel.TC_DEFAULT,
DisplayKey.get("Web.Policy.PA.Validation.MutuallyExclusiveCollisionCov", vehicle.DisplayName),
null, null, COVERAGES_WIZARD_STEP)