Validation for messages.