Defining validation in Command