Validate client's user input in chat example

Thx bro