Don't allow space in user name

Hi, I’d like to restrict people registering from adding a space in their user name, is there a way to prevent this and/or other characters?

1 Like

It is WordPress-level changes. HivePress uses WordPress function sanitize_user() | Function | WordPress Developer Resources so it is needed to make changes for it. Here is a possible solution php - Rewrite wordpress sanitize_user function to disallow whitespace for username registration form - Stack Overflow which you can try to add with the Code Snippets plugin

If you are not familiar with code customization please try consider hiring someone for custom work