Closed hslimen closed 4 years ago
private function foreach_call_validator(string $rule, string $field, array $input, array $rule_params = []) { $values = !is_array($input[$field]) ? [ $input[$field] ] : $input[$field]; foreach ($values as $value) { $result = $this->call_validator($rule, $field, $input, $rule_params, $value); if (is_array($result)) { return $result; } } return true; }
can that solve the problem ?
$values = !is_array($input[$field]) ? [ $input[$field] ] : [$field => $input[$field]];
what are your filters and what is your input? $filters / $data
can that solve the problem ?