In our application a user is prompted to enter a nickname to be connected to the conversation, but our backend server only accepts nicknames that:
- Don't start with a number.
- Don't contain spaces.
How can I replace the users input as he is choosing a nickname if it contains either of the above?