package com.zjrs.zwnw.annotation;

import com.zjrs.zwnw.validator.NumValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = NumValidator.class)
public @interface NumVaild {
    String message() default "格式不合法";

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

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