Implement validate command

I would inline the error message. This simplifies the structure of the test and it's clearly visible in the test, how the message is supposed to look like.