Skip to content

Commit

Permalink
catch up the $error param.
Browse files Browse the repository at this point in the history
  • Loading branch information
ping-yee committed Sep 27, 2022
1 parent a2e7d8d commit d4b2a33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion system/Validation/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public function required_with($str = null, ?string $fields = null, array $data =
*
* @param string|null $str
*/
public function required_without($str = null, ?string $fields = null, array $data = [], ?string $keyField = null): bool
public function required_without($str = null, ?string $fields = null, array $data = [], ?string $error = null, ?string $keyField = null): bool
{
if ($fields === null || empty($data) || $keyField === null) {
throw new InvalidArgumentException('You must supply the parameters: fields, data, keyField.');
Expand Down
2 changes: 1 addition & 1 deletion system/Validation/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ protected function processRules(
$found = true;
$passed = $param === false
? $set->{$rule}($value, $error)
: $set->{$rule}($value, $param, $data, $field);
: $set->{$rule}($value, $param, $data, $error, $field);

break;
}
Expand Down

0 comments on commit d4b2a33

Please sign in to comment.