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

com.avocado.boot.starter.validation.invalid.IPInvalidImpl 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 IPInvalidImpl implements ConstraintValidator {
    @Override
    public boolean isValid(Object o, ConstraintValidatorContext constraintValidatorContext) {
        return StringUtils.matchIp(o.toString().trim());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy