Forum Discussion

Re: Unable to log into Web Store

Ok, great. My EA Account (primary email) contains a hyphen (-). When I omit that, the JS code will enable the submit button. Not helpful if the Web Store will not consider a valid email address as being valid and keep the button disabled. Maybe a good time to reconsider the regex for checking the validity of the provided email address?!

6 Replies

  • shaihulud2k's avatar
    shaihulud2k
    3 years ago
    I am not the only one, but here is the solution, EA
     
     
    This is the offending function being called in EmailForm.js
     
     function validateEmailAddress(email) {
        let validationExp = /^[\S]+@[\w]+(\.[\w]+)*\.\w{2,}$/;
     
        if(!email.match(validationExp)){
          return false;
        }
        return true;
      }

    This is wrong, obsolete and should not be there. The code in EmailForm.js is using double email checking. The first check is right and points to index.js in the email-validator/index.js package, the second is the above, bad code

    React.useEffect(() => {
    const keyDownHandler = event => {
    if (emailValidator.validate(emailAddress) && validateEmailAddress(emailAddress) && event.key === 'Enter') {
    event.preventDefault();
    submitEmailAddress();
    }
    };

     

    emailValidator.validate() does the trick. Just get rid of the redundant, flawed email check and you're done.

     

  • shaihulud2k's avatar
    shaihulud2k
    3 years ago

    Nice stuff, will look into it. But while still not fixed and me getting more annoyed by it, I took another look at EmailForm.js. Further down, where the HTML gets rendered, the redundant (and flawed) email validation also takes place:

    <button
    className={emailValidator.validate(emailAddress) && validateEmailAddress(emailAddress) ? "primary green" : "primary"}
    disabled={emailValidator.validate(emailAddress) && validateEmailAddress(emailAddress) === false}
    onClick={submitEmailAddress}
    >{tryLocalize('WEBSTORE_WEBCLIENT_SUBMIT')}</button>

    Remove that, too, and it should be grand

  • shaihulud2k's avatar
    shaihulud2k
    3 years ago

    @EA_Gunner , this is really getting frustrating now. Two weeks ago a hint of where to fix this was posted, but still nothing?

  • EA_Gunner's avatar
    EA_Gunner
    Icon for EA QV Team rankEA QV Team
    3 years ago

    The issue is still under investigation. The current workaround is to update the email on EA.com and changed it to another email without special characters in the domain. 

About SWGOH Technical Issues

Get help and discuss troubleshooting for Star Wars: Galaxy of Heroes with other players.25,166 PostsLatest Activity: 2 hours ago