User input validation