@Retention(CLASS) @Target({FIELD})
public @interface Email
Requires the component value to be a syntactically valid e-mail address.
The processor emits RegexConstraint.validEmail(message) into the
Validator returned by Binding#getValidator().
@Bind(name="emailField") @Required @Email
private String email;
Stacks well with @Required – the standard email regex accepts the
empty string as “not yet an address,” so combine with @Required when
the field is mandatory.
Methods
public abstract String message() default "" | Override the default error message (“Invalid Email Address”). |
Method details
message
public abstract String message() default ""Override the default error message (“Invalid Email Address”).