All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.codeinghelper.annotation.validator.Length Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package com.github.codeinghelper.annotation.validator;

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

/**
 * @BelongsProject: test
 * @BelongsPackage: com.example.demo.validator
 * @Author: frank
 * @CreateTime: 2020-08-04 22:33
 * @Description: ${Description}
 */
@Documented
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = LengthValidator.class)
public @interface Length {
    String message() default "长度最小为{0}最大为{1}";

    int max() default 32;

    int min() default 4;

    Class[] groups() default {};

    Class[] payload() default {};
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy