
com.lshaci.validate.annotation.Between Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of validate Show documentation
Show all versions of validate Show documentation
A Simple Validate Framework
The newest version!
package com.lshaci.validate.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* validate int value min and max
*
* @author lshaci
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
@Documented
public @interface Between {
/**
* 默认最小值3
*/
public static final String MIN_DEFAULT = "3";
/**
* 默认最小值10
*/
public static final String MAX_DEFAULT = "10";
/**
* 是否需要进行验证
*/
boolean require() default true;
/**
* 数字最小值
*/
String min() default MIN_DEFAULT;
/**
* 数字最大值
*/
String max() default MAX_DEFAULT;
/**
* 验证未通过的提示消息
*/
String message() default "数字大小不在规定范围之内";
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy