It checks whether the length of HTML
field values are greater than or equal to some specified minimum
length, if not it will report an error. Field name, minimum length
are the parameters to this subroutine.
sub validate_info { my ($name,$field, $minlen, $allow_blank) = @_; my $count = 0; my $errcnt; if (length($field) >= $minlen) { $errcnt = 0; ## ok } else { if ((length($field) == 0) && ($allow_blank eq 'Y')) { $errcnt = 0; } else { &print_message("Minimum length for $name is $minlen","W"); $errcnt = 1; ## Counts as an error } } return $errcnt; }