username not accepted

By: Gerry Bolger | Asked: 12/17/2022
ForumsCategory: General questionsusername not accepted
Gerry Bolger asked 1 year ago
I am setting up the standard user registration form, and followed the tutorial. When testing, I am getting the following error: Username is invalid yet it is following the requirements of Only lower case letters (a-z) and numbers (0-9) are allowed. Every entry is the same I don't know what to do to get past this, so any help is appreciated. Many thanks Gerry
6 Answers
Victor Font answered 1 year ago
The WordPress user name field does not have default validation other than checking if it exists already. What security plugin are you using? What validation are you performing with the form? Do you have a default value set?
Gerry Bolger answered 1 year ago
Default settings are being used throughout. Regards security, I don't have any set up as its a testing site
Gerry Bolger replied 1 year ago

Am slightly at a loss

Gerry Bolger answered 1 year ago
I've deleted the original form and created a new one, and appears to be working so, now resolved.
An D answered 1 year ago
I have the same. Everything pretty vanilla on a dev site. Out of the box, "username invalid" for no apparent reason.
Carlos Ossa answered 1 year ago
I had the same problem with some registration forms. I fixed it with this:   function wscu_sanitize_user ($username, $raw_username, $strict) {     $username = wp_strip_all_tags ($raw_username);     return $username; } add_filter ('sanitize_user', 'wscu_sanitize_user', 10, 3);   The function makes wordpress less strict in its requirement for usernames.
Joe Semones answered 1 month ago
I havpre-existing accounts whose usernames violate Formidable's requirement of only lowercase and no special characters. I need Formidable Forms to grace these existing accounts since they cannot be modified. Either that or just allow users to create usernames with special characters.

This is critical since my existing users are using a new member registration form to update their profile after they have logged in with a username which violates the Formidable requirements.

Victor Font replied 1 month ago

Joe, Formidable does not enforce user name constraints. See Carlos' answer immediately above your post.

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community