package com.storlead.framework.common.validation;

import javax.validation.Constraint;
import javax.validation.Payload;

import java.lang.annotation.*;

/**
 * @program: sp-sales-platform
 * @description:
 * @author: chenkq
 * @create: 2024-10-17 10:49
 */

@Constraint(validatedBy = NotContainsValidator.class) // 绑定校验器
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface NotContains {
    String message() default "字符串不能包含指定的子字符串";

    // 用来指定不能包含的字符串
    String value();

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

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