package com.zd.face.valid;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

/**
 * 枚舉自定義驗證
 *
 * @Author: zhoupan
 * @Date: 2021/10/28/9:00
 * @Description:
 */
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = KeyValidator.class)//标明由哪个类执行校验逻辑
public @interface KeyNotNull {

    String message() default "值错误!";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};

}
