Package org.dellroad.stuff.validation
Annotation Interface Hostname
@Documented
@Constraint(validatedBy={})
@Target({METHOD,FIELD,ANNOTATION_TYPE})
@Retention(RUNTIME)
@Pattern(regexp="^(([\\p{Alnum}]([-\\p{Alnum}]*[\\p{Alnum}])?)\\.)*([\\p{Alpha}]([-\\p{Alnum}]*[\\p{Alnum}])?)$")
@ReportAsSingleViolation
public @interface Hostname
Validation constraint requiring a
String
to be a valid DNS hostname (or hostname component).-
Optional Element Summary