package com.backendsys.entity.validator;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

/**
 * 自定义注解 - 取值范围校验
 * (String) 字符串型适用
 */
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {RangeStringArrayValidator.class})
public @interface RangeStringArray {
    String message() default "值有误";
    String[] value() default {};
    Class<?>[] groups() default{};
    Class<? extends Payload>[] payload() default{};
}
