validateCommand
Validates a command body using the validator.
This extension function performs validation on the command body and throws a CommandValidationException if any constraint violations are found.
Return
the validated command body (unchanged)
Parameters
C
the type of the command body
commandBody
the command body to validate
See also
Validator.validate
Throws
if validation fails