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

io.afu.validator.Annimation.NumberStrValidator Maven / Gradle / Ivy

There is a newer version: 2.4-RELEASE
Show newest version
package io.afu.validator.Annimation;

import io.afu.validator.Constant.MsgConstant;
import io.afu.validator.Implement.NumberValidatorImpl;
import io.afu.validator.Implement.TimeValidatorImpl;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ElementType.ANNOTATION_TYPE,ElementType.FIELD,ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {NumberValidatorImpl.class})
public @interface NumberStrValidator {

    String message() default MsgConstant.NUMBER_ILLEGAL;

    Class[] groups() default {};

    Class[] payload() default{};

    /**
     * 允许可空开关
     */
    boolean allowEmpty() default false;

    /**
     * 小数点后精确位数,默认为2位
     */
    int exactDigit() default -1;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy