Interface ConstraintValidator<T>

    • Method Detail

      • validate

        void validate​(T actual,
                      HttpModelType httpModelType,
                      String modelName)
        Validates the single actual.

        The state of the actual must not be altered.

        Parameters:
        actual - the actual value to validate
        httpModelType - the http model type
        modelName - the parameter or header name
        Throws:
        io.rxmicro.http.error.ValidationException - if actual does not pass the constraint
      • validate

        default void validate​(T model)
        Validates the root model.

        The state of the model must not be altered.

        Parameters:
        model - the root model to validate
        Throws:
        io.rxmicro.http.error.ValidationException - if value does not pass the constraint
      • validateList

        default void validateList​(List<T> list,
                                  HttpModelType httpModelType,
                                  String modelName)
        Validates the value list.

        The state of the list must not be altered.

        Parameters:
        list - the list to validate
        httpModelType - the http model type
        modelName - the parameter or header name
        Throws:
        io.rxmicro.http.error.ValidationException - if value does not pass the constraint
      • validateList

        default void validateList​(List<T> models)
        Validates the root model list.

        The state of the value must not be altered.

        Parameters:
        models - the model list to validate
        Throws:
        io.rxmicro.http.error.ValidationException - if value does not pass the constraint