Invalid email address issue

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
User avatar
moccha
Posts: 114
Joined: 13 Feb 2014, 16:09

Invalid email address issue

Post by moccha »

I'm using the SignUpAssistant for users to create accounts. Due to changes over the years, emails that were once invalid are now valid. Web standards are now supporting ASCII.

See this post for information: https://stackoverflow.com/a/2071250

I tried making a test account with the user email of mason@日本.com, but I see that Smartfox itself is rejecting "bad" emails:

Code: Select all

WARN  [SFSWorker:Ext:3] signup.SignUpAssistant  - Email address: mason@日本.com  is invalid, from ( User Name: Guest#1, Id: 1, Priv: 0, Sess: 127.0.0.1:52764 )
I do not validate the email at all currently in my own code, so it must be in the assistant settings. I think the only rules for email could that it needs to be in the format a@b.com - Regex for that would look like:

Code: Select all

~/^.+@.+\..+$/g
For now I have done:

Code: Select all

suac.getConfig().isEmailRequired = false;
and then pass email as an extra field to validate myself.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Invalid email address issue

Post by Lapo »

Thanks for the heads-up.
We'll update the component to reflect the new naming standards. It would probably be best to allow the email validation to be customized, so that developers can use different rules based on their audience and needs.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply