Skip to content

Commit

Permalink
feature: correct validated data
Browse files Browse the repository at this point in the history
  • Loading branch information
krissss committed Nov 1, 2022
1 parent 7e1209a commit 1b368ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Validator/LaravelValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ public function validate(array $data, array $rules, array $messages = [], array
$errors = array_map(fn($messages) => $messages[0], $validator->errors()->toArray());
throw new ValidationException($errors);
}
return array_filter($data, fn($key) => array_key_exists($key, $rules), ARRAY_FILTER_USE_KEY);
return $validator->validated();
}
}

0 comments on commit 1b368ce

Please sign in to comment.