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

com.doyospy.core.annotation.IdCardValidated Maven / Gradle / Ivy

Go to download

Doyospy是一个小而全的基于SpringBoot的java工具类库,通过静态方法封装,方便开发者使用,降低学习成本并提升工作效率。

The newest version!
package com.doyospy.core.annotation;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * 身份证号校验注解实现
 * @author  Robin
 */
public class IdCardValidated implements ConstraintValidator {
    @Override
    public void initialize(IdCard idCard) {
        // todo
    }

    @Override
    public boolean isValid(String s, ConstraintValidatorContext constraintValidatorContext) {
        if (null != s) {
//            return IdcardUtil.isValidCard(s);
            return true;
        }
        return true;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy