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

io.envoyproxy.pgv.RequiredValidation Maven / Gradle / Ivy

There is a newer version: 0.6.13
Show newest version
package io.envoyproxy.pgv;

import com.google.protobuf.GeneratedMessageV3;

/**
 * {@code RequiredValidation} implements PGV validation for required fields.
 */
public final class RequiredValidation {
    private RequiredValidation() {
    }

    public static void required(String field, GeneratedMessageV3 value) throws ValidationException {
        if (value == null) {
            throw new ValidationException(field, "null", "is required");
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy