Hi all, I have just found a way to fix this. The @CaptchaResponse annotation has to be extended, adding 2 new parameters. When the 2 new parameters are added, Hibernate-Validator 4.2 stops complaining about missing group.
This is the class in Seam2.3.0.Beta2
package org.jboss.seam.captcha; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import javax.validation.Constraint; @Retention(RetentionPolicy.RUNTIME) @Documented @Target(ElementType.METHOD) @Constraint(validatedBy=CaptchaResponseValidator.class) public @interface CaptchaResponse { String message() default "incorrect response"; }
The class must be extended with 2 new methods "groups" and "payload", as following:
public @interface CaptchaResponse { String message() default "incorrect response"; Class<?>[] groups() default {}; Class<?>[] payload() default {}; }
With the new methods hibernate validator stops complaining about missing groups.
Hi all,
I have just found a way to fix this. The @CaptchaResponse annotation has to be extended, adding 2 new parameters. When the 2 new parameters are added, Hibernate-Validator 4.2 stops complaining about missing group.
This is the class in Seam2.3.0.Beta2
The class must be extended with 2 new methods "groups" and "payload", as following:
With the new methods hibernate validator stops complaining about missing groups.