Updated user input validation