Package org.kiwiproject.validation
Annotation Type Ipv4AndPort
-
@Documented @Constraint(validatedBy=Ipv4AndPortValidator.class) @Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(RUNTIME) public @interface Ipv4AndPort
The annotated element must have the formipv4-address:port. For example192.168.1.150:8888is valid while192.168.1.150(without port) and1111.1111.1.150:8009(two many digits in octets) are not. Also, as the name indicates, this only supports IPv4 addresses.- Implementation Note:
- Currently the validation only verifies that the IP is in "dotted-quad" syntax followed by a colon and a port. It only validates that each dotted-quad and port are numbers, and does not validate the values are within valid ranges (i.e. it does not check each segment is in the range 0-255 nor does it validate the port range).