Add validation of user input.