phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0017304phplist applicationSubscribe Processpublic13-08-14 16:5006-07-15 18:04
Reporterdeajan 
PrioritylowSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.0.6 
Target Version3.0.XFixed in Version3.2.0 
Summary0017304: Javascript Email verification process can be done better
DescriptionHello,

On the subscribe page, the script that checks emails can be enhanced with a regular expression checking for email validity like this:

function CheckEmail()
{
  var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    return re.test(document.subscribeform.elements["email"].value);
}

This function can then be called right after compareEmail like this:

  if (! compareEmail()) {
    alert("Email adresses don't match");

    return false;
  }
  
  if (! CheckEmail()) {
    alert("Email format is invalid");
    return false;
  }

Regards,
Ozy.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0054583)
support (administrator)
13-08-14 17:29


The email address is also verified in the PHP code after form submission.
(0055981)
gingerling (administrator)
20-03-15 15:56

can this just be implemented?
(0056097)
deajan (reporter)
19-05-15 12:34

Added PR #15 on github/phplist/phplist3 and PR #7 on github/phplist/phplist-lan-texts
(0056099)
michiel (manager)
19-05-15 12:58

Hi deajan, that's great. Would you mind signing the CLA, so I can process the PRs?

https://www.phplist.com/cla [^]


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker