@Retention(CLASS) @Target({FIELD})

public @interface Url

Requires the component value to be a syntactically valid URL (http, https, ftp, or file scheme). The processor emits RegexConstraint.validURL(message) into the Validator returned by Binding#getValidator().

@Bind(name="homepageField") @Url
private String homepage;

Methods

public abstract String message() default ""Override the default error message (“Invalid URL”).

Method details

message

public abstract String message() default ""
Override the default error message (“Invalid URL”).