Is there a way to only allow alpha_dash usernames?
Returns FALSE if the form element contains anything other than alpha-numeric characters, underscores or dashes.
http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
March 01, 2012 4:14pm
Subscribe [3]#1 / Mar 01, 2012 4:14pm
Is there a way to only allow alpha_dash usernames?
Returns FALSE if the form element contains anything other than alpha-numeric characters, underscores or dashes.
http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html
#2 / Mar 02, 2012 2:40pm
Hi AdamSmith,
There isn’t a way to change that in ExpressionEngine without making changes to the Core. However, you can use AJAX Form Validator to set your rules on the front end and disallow spaces and dashes.
Cheers,
#3 / May 08, 2012 9:18am
Hi Dan,
I need something like this, too. How would I change it in the core? I don’t see any other option for me at moment than changing the core.
I am using the username in the URL, AJAX only is not safe enough for me.
#4 / May 11, 2012 12:14pm
Hey pimago,
I can move this over to the Community Help Forum if you would like. In support we are prefer not to guide folks through core changes. 😊
Cheers,
#5 / May 11, 2012 1:03pm
Hi Shane, I think I found it. I changed the user formatting check a little bit in expressionengine/libraries/validate.php. So far it’s working 😊
Thanks,
Phil
#6 / May 15, 2012 12:09pm
Hello Phil,
That’s awesome!
If you need anything else, please just let me know by opening a new thread.
Cheers,