-
Sub-task
-
Resolution: Done
-
Major
-
2.1.1.Final
The following command will create a constraint annotation with no implementation, and a default error message :
constraint-new-annotation --named URL
This command first creates the constraint annotation (notice validatedBy = {})
@Documented
@Constraint(validatedBy = {})
@Target( { METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
@Retention(RUNTIME)
@ReportAsSingleViolation
public @interface URL {
String message() default "Invalid value";
Class<?>[] groups() default { };
Class<? extends Payload>[] payload() default { };
@Target( { METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
@Retention(RUNTIME)
@Documented
public @interface List {
URL[] value();
}
}
- is related to
-
FORGE-1671 Add nested annotation to a constraint annotation
-
- Closed
-
-
FORGE-1667 Improve the constraint-new-annotation command
-
- Open
-