UI cross field validation ignored


I’ve followed the doc for entity level validation:

  • created an annotation
  • created a simple validator returning always false
  • set annotation on entity

Edit screen is generated before annotation creation.

When I edit a new entity, no validation occurs. Why ?

CUBA 7.2.3

Best regards, Stéphane.

@Target({ ElementType.TYPE })
@Constraint(validatedBy = CheckSVTiersIdentificationValidator.class)
public @interface CheckSVTiersIdentification {
	String message() default "pasbon";
	Class<?>[] groups() default {};
	Class<? extends Payload>[] payload() default {};

public class CheckSVTiersIdentificationValidator implements ConstraintValidator<CheckSVTiersIdentification, SV_Tiers_Identification> {
  public void initialize(CheckSVTiersIdentification constraintAnnotation) {
  public boolean isValid(SV_Tiers_Identification value, ConstraintValidatorContext context) {
    return false;

@CheckSVTiersIdentification(groups = UiCrossFieldChecks.class)
@Entity(name = "mdm_SV_Tiers_Identification")
public class SV_Tiers_Identification extends StandardEntity {

It seems that a Default group that I added before in the annotation on entity is the source of the problem.

It’s solved !