To create conditionally validated groups with jsr 303 validation, an interface class is passed to the annotation like this:
@NotEmpty (groups={UpdateValue.class})
I have quite a few different interface types that I want to group in a parent interface in order to organize my code. Is this pattern ok? Should the child interfaces be static or non-static? Should the parent interface be static or non-static?
Here's an example of the interface I want to create:
package com.value.validationTypes;
public interface IValidation {
public interface NewValue {
}
public interface UpdateValue {
}
}
and the way I would use it in my form bean:
@NotEmpty (groups={IValidation.UpdateValue.class})