diff --git a/system/Validation/Rules.php b/system/Validation/Rules.php index 4fbf7cedd2f4..098e39fa22cc 100644 --- a/system/Validation/Rules.php +++ b/system/Validation/Rules.php @@ -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.'); diff --git a/system/Validation/Validation.php b/system/Validation/Validation.php index 4089d78c05e5..ae1823b78a6a 100644 --- a/system/Validation/Validation.php +++ b/system/Validation/Validation.php @@ -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; }