diff options
Diffstat (limited to 'kontakt.cgi')
-rwxr-xr-x | kontakt.cgi | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/kontakt.cgi b/kontakt.cgi index 99951e3..694aabe 100755 --- a/kontakt.cgi +++ b/kontakt.cgi @@ -19,11 +19,6 @@ my $helpdesk = 'siri@jones.dk'; # Set this to 1 for a separate confirmation page my ($confirm) = 1; -# Built-in email validation is too simplistic -my $valid_email = '/^[+_A-Za-z0-9-]+(\.[+_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[_A-Za-z0-9-]+)$/'; - -my $valid_zip_dk = '/^([Dd][Kk])?.?[0-9-]{4}$/'; - my $form = CGI::FormBuilder->new( lang => 'da', title => 'Henvendelse til Byvandring.nu', @@ -39,10 +34,9 @@ my $form = CGI::FormBuilder->new( kommentar /], validate => { - postnr => $valid_zip_dk, - _postnr => $valid_zip_dk, #fake check to silence warning of variable used only once - email => $valid_email, - _email => $valid_email, #fake check to silence warning of variable used only once + postnr => '/^([Dd][Kk])?.?[0-9-]{4}$/', + #email => 'MAIL', # Built-in email validation is too simplistic + email => '/^[+_A-Za-z0-9-]+(\.[+_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[_A-Za-z0-9-]+)$/', antal => 'INT', }, required => [qw/ |