X-Git-Url: https://git.p6c8.net/form-email.git/blobdiff_plain/1920f0f5bae14e21fcd25f63aab273da0bda0fd3..542aadbfb3e19f62899f4513424da7774e2b80af:/form-email/mailer.php?ds=sidebyside diff --git a/form-email/mailer.php b/form-email/mailer.php index bed4207..94b80e8 100644 --- a/form-email/mailer.php +++ b/form-email/mailer.php @@ -110,6 +110,20 @@ while(list($user_field,$user_field_data) = each($user_fields)) { continue; } + # Laengen-Pruefung + + if(isset($user_field_data['min']) && $user_field_data['min']) { + if(strlen($user_field_content) < $user_field_data['min']) { + show_user_error($user_field_data['errors']['too_short']); + } + } + + if(isset($user_field_data['min']) && $user_field_data['max']) { + if(strlen($user_field_content) > $user_field_data['max']) { + show_user_error($user_field_data['errors']['too_long']); + } + } + # Pruefung gegen frei definierbare Pruef-Funktion if(isset($user_field_data['check']) && $user_field_data['check'] != '') {