user input validation.