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

io.convergence_platform.common.validations.RequiredValidator Maven / Gradle / Ivy

Go to download

Holds the common functionality needed by all Convergence Platform-based services written in Java.

The newest version!
package io.convergence_platform.common.validations;

import jakarta.validation.ConstraintValidator;
import jakarta.validation.ConstraintValidatorContext;

public class RequiredValidator implements ConstraintValidator {
    public static void pathVariable(String value, String varName) {
        ValidationHelper.raiseValidationErrorForPathVariable(!"".equals(value), "required", varName);
    }

    @Override
    public boolean isValid(Object value, ConstraintValidatorContext context) {
        return value != null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy