com.avocado.boot.starter.validation.invalid.DomainInvalidImpl 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 DomainInvalidImpl implements ConstraintValidator {
@Override
public boolean isValid(Object o, ConstraintValidatorContext constraintValidatorContext) {
return StringUtils.matchDomain(o.toString().trim());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy