[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 60788] New: mail regular expression fails
From:       kudling () kde ! org
Date:       2003-07-05 9:17:11
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
     
http://bugs.kde.org/show_bug.cgi?id=60788     
           Summary: mail regular expression fails
           Product: konqueror
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: NOR
         Component: kjs
        AssignedTo: konq-bugs@kde.org
        ReportedBy: kudling@kde.org


Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.2 
OS:          Linux

Open www.sof.de and do the neckermann.de game, which pops up. On the 4th page, it's \
not possible to enter a valid email address. I paste the source at the bottom. Is it \
a problem with the RegExp?

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { 
	    re = /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/
  if ( !re.test(val) ) errors+='- '+nm+' muß eine valide e-Mail-Adresse sein.\n';
	    //p=val.indexOf('@');
        //if (p<1 || p==(val.length-1)) errors+='- '+nm+' muß eine valide \
e-Mail-Adresse sein.\n';  } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' muß eine Zahl sein.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+'\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+'\n'; }
  } if (errors) alert('Bitte füllen Sie noch die nachfolgenden\n Felder im Formular \
aus:\n'+errors);  document.MM_returnValue = (errors == '');
}//-->


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic