Added text input validation