@Email(message="Please provide a valid email address")
@Pattern(regexp="[A-Za-z0-9.%\'+_\\-]+@[A-Za-z0-9.\\-]+\\.[A-Za-z\\S]{2,20}$",
message="Please provide a valid email address")
@Target({METHOD,FIELD,ANNOTATION_TYPE})
@Retention(RUNTIME)
@Constraint(validatedBy={})
@Documented
public @interface Email
Annotation for email validation.
- Author:
- Alex Bogdanovski [[email protected]]
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
"[A-Za-z0-9.%\'+_\\-]+@[A-Za-z0-9.\\-]+\\.[A-Za-z\\S]{2,20}$". -
Optional Element Summary
-
Field Details
-
EMAIL_PATTERN
"[A-Za-z0-9.%\'+_\\-]+@[A-Za-z0-9.\\-]+\\.[A-Za-z\\S]{2,20}$".- See Also:
-
-
Element Details
-
message
String messageError for invalid email.- Returns:
- the error message
- Default:
"Please provide a valid email address"
-
groups
-
payload
-