package cn.common.common.validation.validator;


import cn.common.common.utils.common.CheckParam;
import cn.common.common.validation.IsDateStr;

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

/**
 * @author created by Singer email:singer-coder@qq.com
 * @time 2017/11/20
 * @description
 */
public class IsDateStrValidator implements ConstraintValidator<IsDateStr,String> {


    @Override
    public void initialize(IsDateStr isDateStr) {

    }

    @Override
    public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext) {
        return CheckParam.isDatetime(value);
    }
}
