]> git.p6c8.net - form-email.git/blobdiff - form-email/mailer.php
Regex und Check-Funktion fuer indiv. Formularfelder
[form-email.git] / form-email / mailer.php
index c85d2062320e185696910c546e45936604d9a675..b32f095ca6efd6f911c8ab76183e19ee2e751ff7 100644 (file)
@@ -98,13 +98,13 @@ while(list($user_field,$user_field_data) = each($user_fields)) {
     $user_field_content = formdata($user_field);\r
 \r
     if(isset($user_field_data['check']) && $user_field_data['check'] != '') {\r
-        if(function_exists($user_field_data['check']) && call_user_func($user_field_data['check'],$user_field_content)) {\r
+        if(function_exists($user_field_data['check']) && call_user_func($user_field_data['check'],$user_field_content) === false) {\r
             show_user_error($user_field_data['errors']['check_fail']);\r
         }\r
     }\r
 \r
     if(isset($user_field_data['regex']) && $user_field_data['regex'] != '') {\r
-        if(preg_match($user_field_data['regex'],$user_field_content)) {\r
+        if(!preg_match($user_field_data['regex'],$user_field_content)) {\r
             show_user_error($user_field_data['errors']['match_fail']);\r
         }\r
     }\r

patrick-canterino.de