com.gccloud.starter.common.validator.module.user.Email Maven / Gradle / Ivy
package com.gccloud.starter.common.validator.module.user;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 邮箱校验
*
* @author liuchengbiao
* @date 2021年03月02日13:41:23
*/
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = EmailValidator.class)
public @interface Email {
String message() default "邮箱格式不正确";
Class>[] groups() default {};
Class extends Payload>[] payload() default {};
}