Annotation Type CssColorString
@Documented
@Constraint(validatedBy=CssColorStringValidator.class)
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE})
@Retention(RUNTIME)
@Repeatable(CssColorString.List.class)
public @interface CssColorString
Constraint validation that may be applied to values of type
String. Checks that the string represents a valid
CSS color string. Does not check for null, empty, or blank strings, use the
NotNull, NotEmpty, or
NotBlank annotations for that.
A valid color string is any string accepted by CssColor.valueOf(String).
- Since:
- 8.2.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceDefines severalCssColorStringconstraints on the same element. -
Optional Element Summary
Optional Elements
-
Element Details
-
groups
Class<?>[] groups- Returns:
- Allows the specification of validation groups, to which this constraint belongs. When not specified, the
constraint is placed in the
Defaultgroup.
- Default:
{}
-
message
String messageGets the key for creating error messages in case the constraint is violated.- Returns:
- The default key for creating error messages in case the constraint is violated.
- Default:
"{de.xima.fc.validation.constraints.CssColorString.message}"
-
payload
Class<? extends javax.validation.Payload>[] payload- Returns:
- The payload that can be used by clients of the Jakarta Bean Validation API to assign custom payload objects to a constraint.
- Default:
{}
-