What would be the right way to go about the following:
Input field for title
Input field for username
Username rules: 1 to 20 alphanumeric characters, including underscores (“_”), lowercase
When the user types a title like:
- Hello World
- Pizza Group
- Crazy Ones !@#!@#!#!#*
the username field is dynamically updated as the user types the title formatting the title to meet the username rules?
Do I need some keydown with a regex? Ideas? Thanks
You can do the regex replacement with pure JS. You can use jQuery to bind to the keyPress event (or any other you wish to). Hope this helps.