WIP: Username is not valid error on user registration form

Browser: Chrome 110
OS: macOS.
URL: Temporarily check here on the staging site https://stagingapp15260.cloudwayssites.com/signup/

The registration form is giving a “Username is not valid.” error.
On the form settings, the “autogenerate username” option is giving this issue so I thought “hey, let’s just use the same email the user is submitting” but that doesn’t work either.

Please help solving this.

images:


PS: error image below on reply since for some reason, this doesn’t allow me to upload more than 1 image per message.

Here the error message after submission:

Hi @jotace,

I’m unable to replicate the issue both locally and on your site:

What value are you using for the email?

Thank you, I believe I’ve pinpointed the issue. I use an email address with a plus sign to help organize my inbox. For example, instead of xyz@gmail.com, I use xyz+bricks@gmail.com, which is a Gmail feature that helps sort emails. The problem appears to be that the Bricks builder doesn’t recognize this email format for some reason.
Several customers use this method for registration, so it’s important. If you could kindly confirm that this is a bug and escalate it for a prompt fix, I would appreciate it.

Hi @jotace,

Not sure this counts as a bug, but I think this should and can be improved nonetheless. I have added this use case to our internal tracker so that if the email contains special characters, we’d automatically remove them.

Why would you remove the “+”? The “+” is a perfectly valid email address and should be respected.
From RFC822 ( now RFC 5322 )

Local part

The local part can be up to 64 characters in length and consist of any combination of alphabetic characters, digits, or any of the following special characters:
! # $ % & ‘ * + – / = ? ^ _ ` . { | } ~

NOTE: The period character (“.”) is valid for the local part subject to the following restrictions:

it is not the first or last character
two or more consecutive periods

It’s not just gmail but almost any email system. I certainly use it extensively.

We would remove the special characters from the auto-generated username, not the email. Using a “+” in a WordPress username is invalid.

That would surely solve the situation. Please do implement it soon if not impossible and thanks for your help and dedication. :pray:

Cheers!