Skip to content

Commit

Permalink
fix: use input aliases for validation
Browse files Browse the repository at this point in the history
  • Loading branch information
dshafik committed Jan 9, 2025
1 parent 63ec09b commit efd21cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Bag/Pipelines/Pipes/Validate.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function __invoke(BagInput $input): BagInput
$aliases = $input->params->aliases();

$rules = LaravelCollection::wrap($bagClass::rules())->mapWithKeys(function (mixed $rules, string $key) use ($aliases) {
$key = $aliases['output'][$key] ?? $key;
$key = $aliases['input'][$key] ?? $key;

return [$key => $rules];
});
Expand Down

0 comments on commit efd21cd

Please sign in to comment.