Skip to content

Commit d4b2a33

Browse files
committed
catch up the $error param.
1 parent a2e7d8d commit d4b2a33

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

system/Validation/Rules.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public function required_with($str = null, ?string $fields = null, array $data =
280280
*
281281
* @param string|null $str
282282
*/
283-
public function required_without($str = null, ?string $fields = null, array $data = [], ?string $keyField = null): bool
283+
public function required_without($str = null, ?string $fields = null, array $data = [], ?string $error = null, ?string $keyField = null): bool
284284
{
285285
if ($fields === null || empty($data) || $keyField === null) {
286286
throw new InvalidArgumentException('You must supply the parameters: fields, data, keyField.');

system/Validation/Validation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ protected function processRules(
312312
$found = true;
313313
$passed = $param === false
314314
? $set->{$rule}($value, $error)
315-
: $set->{$rule}($value, $param, $data, $field);
315+
: $set->{$rule}($value, $param, $data, $error, $field);
316316

317317
break;
318318
}

0 commit comments

Comments
 (0)