validate

abstract fun validate()

Validates the command payload for correctness and consistency.

This method should check all business rules and constraints applicable to the command. If validation fails, it should throw an appropriate exception with a descriptive message.

Validation should be:

  • Fast and lightweight (avoid expensive operations)

  • Deterministic (same input always produces same result)

  • Comprehensive (cover all critical validation rules)

Throws

me.ahoo.wow.command.CommandValidationException

when business validation rules are violated

when input parameters are invalid

when the command is in an invalid state