Annotation Interface OptionalString
@Constraint(validatedBy=OptionalStringValidator.class)
@Documented
@Length
@ReportAsSingleViolation
@Retention(RUNTIME)
@Target({METHOD,FIELD})
public @interface OptionalString
Optional but if it is supplied it must be no longer than max characters and must not be the empty string (0-length).
-
Optional Element Summary
-
Element Details
-
groups
Class<?>[] groups- Default:
- {}
-
message
String message- Default:
- "{com.atlassian.bitbucket.validation.optional.string.message}"
-
minimumSize
@OverridesAttribute(constraint=org.hibernate.validator.constraints.Length.class, name="min") int minimumSize- Default:
- 1
-
payload
Class<? extends javax.validation.Payload>[] payload- Default:
- {}
-
size
@OverridesAttribute(constraint=org.hibernate.validator.constraints.Length.class, name="max") int size- Default:
- 255
-