I had the same problem.
This is my method. It only allows usernames that have numbers and letters.
I found a solution.
- have an input for username
- have a button to save/register the username (that starts the workflow for registering the username)
- set a condition to the button
input for username’s value:extract with regex PASTE THIS REGEX CODE [a-zA-Z0-9] doesn’t contain input for username’s value and input for username’s value is not empty
condition should be this element isn’t clickable and the box should be checked for this condition
so in total the condition FOR THE BUTTON should read:
input for username’s value:extract with regex doesn’t contain input for username’s value and input for username’s value is not empty
If the button isn’t clickable, then the workflow won’t start. If the workflow won’t start, then the user can’t register that username.
You could also have text that uses this very same condition that appears that tells the user why they can’t click.
If you want to allow some characters, after 0-9, just add characters you want. So you can add _ or $ or . or all three in a row but make sure it fits within the brackets [ ] I dont know why you would want spaces for a username.
ex: [a-zA-Z0-9$] would allow $ in addition to letters and numbers.