]> git.p6c8.net - form-email.git/blobdiff - form-email/mailer.php
Fehlermeldungen bei indiv. Formularfeldern enthalten
[form-email.git] / form-email / mailer.php
index bed4207d6b2bf30b326f0f6a403084e0735e8f31..94b80e870c1ed2b17bd23a4f3dc0156669037c83 100644 (file)
@@ -110,6 +110,20 @@ while(list($user_field,$user_field_data) = each($user_fields)) {
         continue;\r
     }\r
     \r
         continue;\r
     }\r
     \r
+    # Laengen-Pruefung\r
+    \r
+    if(isset($user_field_data['min']) && $user_field_data['min']) {\r
+        if(strlen($user_field_content) < $user_field_data['min']) {\r
+            show_user_error($user_field_data['errors']['too_short']);\r
+        }\r
+    }\r
+    \r
+    if(isset($user_field_data['min']) && $user_field_data['max']) {\r
+        if(strlen($user_field_content) > $user_field_data['max']) {\r
+            show_user_error($user_field_data['errors']['too_long']);\r
+        }\r
+    }\r
+    \r
     # Pruefung gegen frei definierbare Pruef-Funktion\r
 \r
     if(isset($user_field_data['check']) && $user_field_data['check'] != '') {\r
     # Pruefung gegen frei definierbare Pruef-Funktion\r
 \r
     if(isset($user_field_data['check']) && $user_field_data['check'] != '') {\r

patrick-canterino.de