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

group.rxcloud.capa.addons.serialzer.validate.BigIntegerValidator Maven / Gradle / Ivy

package group.rxcloud.capa.addons.serialzer.validate;
public final class BigIntegerValidator {
    public static final BigIntegerValidator INSTANCE = new BigIntegerValidator();

    private BigIntegerValidator() {
    }

    public TypeValidateResult validateRawValue(String rawValue, int bigIntMaxLength) {
        TypeValidateResult typeValidateResult = new TypeValidateResult();
        if (rawValue.length() > bigIntMaxLength) {
            typeValidateResult.addErrorMessage(String.format("the length of BigInteger is to long, should not be longer than %d.", bigIntMaxLength));
            typeValidateResult.setPass(false);
        }
        return typeValidateResult;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy