Interface ValidationResponse


public interface ValidationResponse
Response from a validation context after processing all checks.
  • Method Details

    • valid

      boolean valid()
      True if this is a valid response.
      Returns:
      true if this is a valid response, false otherwise
    • message

      String message()
      Message describing the validation failure(s).
      Returns:
      message describing the validation failure(s)
    • violations

      List<ConstraintViolation> violations()
      All violations of this response.
      Returns:
      list of violations
    • toException

      ValidationException toException()
      Convert this response to a ValidationException.
      Returns:
      a new exception with all violations from this response
      Throws:
      IllegalStateException - if this response is not failed