ViolationText

public final class ViolationText

Provides error diagnostic text for a violation of a validation constraint.

If a ConstraintViolation has nested violations, they are listed in separate lines.

Functions

Link copied to clipboard
public static ViolationText of(ConstraintViolation violation)
Creates a new instance of the text for the passed violation.
Link copied to clipboard
public static String ofAll(Collection<ConstraintViolation> violations)
Creates text with diagnostics for the passed violations; each diagnostics message starts with a new line.
Link copied to clipboard
public String toString()