$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