Skip to content

Commit 2e62c82

Browse files
committed
modify: modify comment out and make up the dot lost before.
1 parent 288f37b commit 2e62c82

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

system/Validation/Rules.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,12 @@ public function required_with($str = null, ?string $fields = null, array $data =
279279
* required_without[id,email]
280280
*
281281
* @param string|null $str
282+
* @param string|null $keyField This rule param fields aren't present, this field is required.
282283
*/
283284
public function required_without($str = null, ?string $fields = null, array $data = [], ?string $error = null, ?string $keyField = null): bool
284285
{
285286
if ($fields === null || empty($data)) {
286-
throw new InvalidArgumentException('You must supply the parameters: fields, data');
287+
throw new InvalidArgumentException('You must supply the parameters: fields, data.');
287288
}
288289

289290
// If the field is present we can safely assume that
@@ -306,7 +307,7 @@ public function required_without($str = null, ?string $fields = null, array $dat
306307
}
307308
if (strpos($field, '.') !== false) {
308309
if ($keyField === null) {
309-
throw new InvalidArgumentException('You must supply the parameters: keyField');
310+
throw new InvalidArgumentException('You must supply the parameters: keyField.');
310311
}
311312

312313
$fieldData = dot_array_search($field, $data);

system/Validation/StrictRules/Rules.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,8 @@ public function required_with($str = null, ?string $fields = null, array $data =
302302
*
303303
* required_without[id,email]
304304
*
305-
* @param mixed $str
305+
* @param mixed $str
306+
* @param string|null $keyField This rule param fields aren't present, this field is required.
306307
*/
307308
public function required_without($str = null, ?string $fields = null, array $data = [], ?string $error = null, ?string $keyField = null): bool
308309
{

0 commit comments

Comments
 (0)