You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/08/12 20:29:08 UTC
DO NOT REPLY [Bug 22124] -
Email validation is incorrect
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22124>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22124
Email validation is incorrect
------- Additional Comments From rajxkhanna@yahoo.com 2003-08-12 18:29 -------
while * is a valid character in email-
To make sure period (.) is a required,
if (symbolic) {
// this is a symbolic domain so check components
String[] domainSegment = new String[10];
boolean match = true;
int i = 0;
int l = 0;
while (match) {
match = matchAtomPat.match(atomPat, domain);
if (match) {
domainSegment[i] = matchAtomPat.group(1);
l = domainSegment[i].length() + 1;
domain = (l >= domain.length())? "" : domain.substring
(l);
i++;
}
}
int len = i;
if (domainSegment[len - 1].length() < 2 || domainSegment[len -
1].length() > 4) {
bValid = false;
}
// Make sure there's a host name preceding the domain.
if (len < 2) {
bValid = false;
}
}else{
bValid = false;
}
}