diff --git a/app/Helpers/Helper.php b/app/Helpers/Helper.php index 8bd3ab420c..d77f41b01f 100644 --- a/app/Helpers/Helper.php +++ b/app/Helpers/Helper.php @@ -916,20 +916,20 @@ class Helper if ($rule_name == $field) { if (is_array($rule)) { if (in_array('required', $rule)) { - $required = true; + return true; } else { - $required = false; + return false; } } else { if (strpos($rule, 'required') === false) { - $required = false; + return false; } else { - $required = true; + return true; } } } } - return $required; + return false; } /**