Email address / addpop / What is a valid username?

kamm

Well-Known Member
Jan 17, 2004
61
1
158
Spain
cPanel Access Level
Root Administrator
Thanks, but that doesn't have the information I'm seeking.

I'm trying to find out what cpanel considers a valid username for an email address.

Minimum, maximum characters?
Characters allowed?
and something I just remembered...
Reserved words?
 

kamm

Well-Known Member
Jan 17, 2004
61
1
158
Spain
cPanel Access Level
Root Administrator
OK - thanks.

I think I'll just limit it to this:
Code:
/^[a-zA-Z0-9\.]+$/
...should be good enough for most purposes and no doubt addpop will fail if it's not.
 

Snorx

Registered
Sep 18, 2013
1
0
1
cPanel Access Level
Root Administrator
OK - thanks.

I think I'll just limit it to this:
Code:
/^[a-zA-Z0-9\.]+$/
...should be good enough for most purposes and no doubt addpop will fail if it's not.
Actually, I found out that the following expression specifically gives the needed validation:

Code:
/^(?!.*(\.)\1)[a-zA-Z0-9_\-]+([a-zA-Z0-9_\.\-]+[a-zA-Z0-9_\-])?$/
Regards,
Georgi