01: package org.caramba.validator;
02:
03: import org.caramba.CarambaConstants;
04:
05: import java.lang.annotation.ElementType;
06: import java.lang.annotation.Retention;
07: import java.lang.annotation.RetentionPolicy;
08: import java.lang.annotation.Target;
09:
10: /**
11: * Created by IntelliJ IDEA.
12: * User: Pieter
13: * Date: Apr 7, 2006
14: * Time: 7:52:44 AM
15: * To change this template use File | Settings | File Templates.
16: */
17: @Target({ElementType.FIELD})
18: @Retention(RetentionPolicy.RUNTIME)
19: public @interface CustomValidator {
20: Class validatorClass();
21:
22: String messageKey() default "errors.maxlength";
23:
24: String fieldNameKey() default "";
25:
26: String errorsId() default CarambaConstants.GLOBALERRORS;
27:
28: ValidatorProperty[] properties() default {};
29:
30: ValidationTrigger trigger() default ValidationTrigger.ALWAYS;
31:
32: }
|