onConstraintViolations

public static InvalidCommandException onConstraintViolations(Command command, Iterable<ConstraintViolation> violations)

Creates an exception instance for a command message, which has fields that violate validation constraint(s).

Parameters

command

an invalid command

violations

constraint violations for the command message