input validation.