validate user inputs