com.avocado.boot.starter.validation.invalid.BankCardInvalidImpl Maven / Gradle / Ivy
package com.avocado.boot.starter.validation.invalid;
import com.avocado.boot.starter.core.utils.StringUtils;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
/**
* @author :qiaoliang
* @date :2020-06-18
*/
public class BankCardInvalidImpl implements ConstraintValidator {
@Override
public boolean isValid(Object o, ConstraintValidatorContext constraintValidatorContext) {
return StringUtils.matchBankCard(o.toString().trim());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy