Completed: validate user input.