client input validation