Maxfr
September 30, 2020, 4:14pm
1
Hello,
For the registration of my users, I want the username to be only lowercase characters and numbers . (no capital letter, space or special characters)
I was thinking of adding a condition to the registration button, but I can’t find a formula that works. I have explored the possibility of “Find and Replace”, but I do not know the Regex pattern.
Thank you!
You can convert your value using this parameter:
To add this as a condition/format during the user input you should take a look around some input validation plugin
Also maybe these threads can help:
We have just published a new plugin
Phone Number Input with Formatting - this is an input field designed specifically for phone numbers. Users can select their country from a drop-down list and the input element would hint the right format. Plugin would also check whether the phone number format is correct and would return the result as a state. Plugin would also return the phone number in case it is correctly entered.
You can try the working demo here:
Zeroqode Phone Number Input with Format…
Hello
While creating a form to collect a user’s SSN to be converted by Stripe, I added an input field and set the content format to “Text (numbers only)”. I also set the limit of characters to 9.
Without adding any new conditionals, or changing anything else, it seems that whenever I try to fill in this input in test mode, it thinks it is invalid as indicated by it’s borders highlighting in red from Bubble’s pre-built conditional. This weird invalidation issue is also causing problems with me …
petter
September 30, 2020, 5:27pm
3
This regex pattern should help you find non-alphanumeric characters:
[^A-Za-z0-9]
(keep in mind that this is in reverse, so it will return only characters that are not alphanumeric. So use it with the Find and replace)
I think you can execute a do when input value has changed and then format the input’s value to lowercase.
Pretty easy workaround if you ask me. Just make sure to add conditional logic to alert any unwanted characters.
Maxfr
October 1, 2020, 5:42pm
5
Thanks a lot for your help! it works!
I used conditions (regex “[^ a-z0-9]” + convert value: lowercase) on the validate button of the form, and on a text to inform the user when there is an error in input username .
2 Likes
system
Closed
December 9, 2020, 4:14pm
6
This topic was automatically closed after 70 days. New replies are no longer allowed.