While it will test the format, it can’t test if it’s legit, if you’re looking into that there are scripts out there that I believe test if a mail server is at that address or something like the sort.
If someone submits an illegal username such as abc123-& do you want to detect, inform and abort? (“sorry bad user, try again”) or do you want to correct, forgive and continue? (ie get rid of the & in this case)
Zurev - Thanks, great to know there’s a site like that. And yeah I meant that I just want to check that the format is correct. I will be sending an email with a link for user validation, upon registration, once I figure out how (starts searching sitepoint, heh)
Cups - I have preg match set up and it’s currently throwing an error out if the username is invalid. The username regex I posted seems to be working good so far.
Anthony - Thanks, I will give that a shot - I guess that’s probably better to use than a regex anyway if I plan on sending a validation email?