Interface RequestValidator

    • Method Detail

      • supports

        boolean supports​(Class<?> clazz)
        Tells whether this validator supports the given type.
        Parameters:
        clazz - the class of the instance that will be tested/validated
        Returns:
        true if this validator can support the given type, false otherwise
      • validate

        default void validate​(Object requestBody)
        Validates the given request body.
        Parameters:
        requestBody - the request body to validate
        Throws:
        com.broadleafcommerce.common.error.validation.ValidationException - if the request body is invalid
      • validate

        void validate​(Object requestBody,
                      org.springframework.validation.Errors errors)
        Validates the given request body.
        Parameters:
        requestBody - the request body to validate
        errors - the errors to contribute to when validation errors occur