Annotation Interface URL
@Documented
@Constraint(validatedBy=URLValidator.class)
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE})
@Retention(RUNTIME)
@Repeatable(URL.List.class)
public @interface URL
Constraint that validates that a character sequence is a URL.
- Since:
- 5.1.0
-
Nested Class Summary
Nested Classes -
Optional Element Summary
Optional Elements
-
Element Details
-
message
-
groups
-
payload
-
protocol
String protocol- Returns:
- The required URL scheme, or an empty string to allow any scheme.
- Default:
""
-
host
-
port
int port- Returns:
- The required URL port, or
-1to allow any port.
- Default:
-1
-
regexp
-
flags
jakarta.validation.constraints.Pattern.Flag[] flags- Returns:
- The flags used with
regexp().
- Default:
{}
-