in reply to Re: Validate newline delimited email list
in thread Validate newline delimited email list
and gives memy ($error) = 0; my (@other_addresses) = split( /\n/, $email_list ); foreach (@other_addresses) { my $ok = Email::Valid->address($_); $error++ if(!$ok); print "address($_) = $ok\n"; print "error ".$error."<br>"; } $error_message .= "$error Email list contains an invalid email ad +dress.<br>" if $error;
address(test@test.com ) = error 1 address(test2@test.com) = test2@test.com error 1 There was an error with your form submission. 1 Email list contains an invalid email address.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Validate newline delimited email list
by ikegami (Patriarch) on Jan 12, 2007 at 21:50 UTC | |
by philosophia (Sexton) on Jan 12, 2007 at 22:20 UTC | |
by philosophia (Sexton) on Jan 12, 2007 at 22:44 UTC | |
by ikegami (Patriarch) on Jan 12, 2007 at 22:52 UTC | |
by philosophia (Sexton) on Jan 12, 2007 at 22:08 UTC | |
by ikegami (Patriarch) on Jan 12, 2007 at 22:31 UTC | |
by philosophia (Sexton) on Jan 12, 2007 at 22:33 UTC | |
by ikegami (Patriarch) on Jan 12, 2007 at 22:52 UTC | |
| |
|
Re^3: Validate newline delimited email list
by Sagacity (Monk) on Jan 12, 2007 at 22:53 UTC |