} elsif (length $in{'mailpasswd'}) {
if (! $in{'quiz'}) {
- print "Please answer the quiz question.";
- exit 0;
+ finish_error('noquiz');
} elsif ($in{'quiz'} !~ m{^(?:bcp5|rfc1918)$}i) {
- print "Wrong answer to the quiz question.";
- exit 0;
+ finish_error('badquiz');
}
read_database();
my ($type) = @_;
my ($t, $esel, $f);
foreach $t (qw(noemail nonet noname nocontact badsize wrongsize badnet wrongnet
- nopassword badpassword notfound badchar)) {
+ nopassword badpassword notfound badchar noquiz badquiz)) {
$esel= "error_$t";
$$esel= 0;
$f=1 if $type eq $t;
The name, contact or email address you specified contains illegal character(s).
@@@endif:@@@
+@@@if:error_noquiz@@@
+Please answer the quiz question, to prove you're not a robot.
+@@@endif:@@@
+
+@@@if:error_badquiz@@@
+Wrong answer to the quiz question.
+@@@endif:@@@
+
@@@endif:@@@