Skip to main content
You can customize the validation performed when creating or updating limit structures, limits, and incidents by adding beans that implement the ILimitStructureValidator, ILimitValidator, and IIncidentValidator interfaces, respectively. Here’s how to do this:

1. Create the Spring Bean(s)

These interfaces provide the explicit type parameter for the generically-typed IValidator interface:
To implement a custom validator, create a class that implements the appropriate interface and override its methods. A custom implementation of ILimitValidator could look like this:
Note that the hasErrors method is not overridden in the custom validator. The default implementation of this method in IValidator is sufficient for most use cases.

2. Import the Spring Bean

Once the bean is created, import it into the project. See Importing Spring Beans into the Project on how to do this. Once done, Spring will use the custom bean when validating the relevant object type.