Link to home
Start Free TrialLog in
Avatar of petaganayr
petaganayr

asked on

Mandatory fields and username restrictions on a WordPress site.

Hello!

I have a WordPress site but I have no experience with PHP. The website has an account sign up page.

I'd like to make filling out the 'First Name' and the 'Last Name' fields a requirement when users sign up for an account. I'd also like to implement 'Username' creation restrictions, for example:

The following special characters are not allowed:
" / \ [ ] : ; | = , + * ? < >

For the required fields, I can probably copy the code from the other required fields that is already in place. But the restriction I don't know how to do. Does anybody have a sample code that I can take a look at?

Thank you  in advance!
SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Mark Brady
Mark Brady
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of petaganayr
petaganayr

ASKER

Thank you for the input. I'll be doing some testing this weekend. I will let everyone know how it went.
Thank you for the comments. I chose Mark's comment because I used his example and made my own lines of codes.