Package feast.common.validators
Annotation Type OneOfStrings
-
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER}) @Retention(RUNTIME) @Documented @Constraint(validatedBy=OneOfStringValidator.class) public @interface OneOfStrings
Annotation for String "one of" validation. Allows for the definition of a collection through an annotation. The collection is used to test values defined in the object.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Class<?>[]groupsAllows for the specification of validation groups to which this constraint belongs.StringmessageClass<? extends javax.validation.Payload>[]payloadAn attribute payload that can be used to assign custom payload objects to a constraint.String[]value
-
-
-
Element Detail
-
message
String message
- Returns:
- Default error message that is returned if the incorrect value is set
- Default:
- "Field value must be one of the following: {value}"
-
-
-
groups
Class<?>[] groups
Allows for the specification of validation groups to which this constraint belongs.- Default:
- {}
-
-
-
payload
Class<? extends javax.validation.Payload>[] payload
An attribute payload that can be used to assign custom payload objects to a constraint.- Default:
- {}
-
-
-
value
String[] value
- Returns:
- Default value that is returned if no allowed values are configured
- Default:
- {}
-
-