|
From: Mark K. <seg...@us...> - 2002-12-18 20:13:17
|
Update of /cvsroot/formmagick/formmagick/lib/CGI/FormMagick/Validator
In directory sc8-pr-cvs1:/tmp/cvs-serv10202/lib/CGI/FormMagick/Validator
Modified Files:
Tag: MITEL-0_87
Network.pm
Log Message:
Sync CVS repository with Mitel changes to date. Remove Persistence::Object::Simple and CGI::Persistent from the repository. use RFC822 to parse email addresses in Network validator. Trim blanks from XML lexicon entries. Updated changelog.
Index: Network.pm
===================================================================
RCS file: /cvsroot/formmagick/formmagick/lib/CGI/FormMagick/Validator/Network.pm,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -C2 -r1.9 -r1.9.2.1
*** Network.pm 24 Jun 2002 17:55:14 -0000 1.9
--- Network.pm 18 Dec 2002 20:13:13 -0000 1.9.2.1
***************
*** 11,14 ****
--- 11,15 ----
package CGI::FormMagick::Validator;
use strict;
+ use Mail::RFC822::Address;
=pod
***************
*** 87,94 ****
if (not defined $data ) {
return "You must enter an email address.";
! } elsif ($data =~ /.+\@.+\..+/) {
return "OK";
} else {
! return "This field doesn't look like an email address - it should contain an at-sign (\@)";
}
}
--- 88,95 ----
if (not defined $data ) {
return "You must enter an email address.";
! } elsif (Mail::RFC822::Address::valid($data)) {
return "OK";
} else {
! return "This field doesn't look like an RFC822-compliant email address";
}
}
|