Skip to content

Commit 2d33df9

Browse files
Update system/Validation/Rules.php
Co-authored-by: Mostafa Khudair <59371810+mostafakhudair@users.noreply.github.com>
1 parent 61bcf76 commit 2d33df9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

system/Validation/Rules.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,12 +376,13 @@ public function required_with($str = null, string $fields, array $data): bool
376376
// as $fields is the lis
377377
$requiredFields = [];
378378

379-
foreach ($fields as $field) {
379+
foreach ($fields as $field)
380+
{
380381
if (
381-
(strpos($field, '.') !== false &&
382-
!empty(dot_array_search($field, $data))) ||
383-
(array_key_exists($field, $data) && !empty($data[$field]))
384-
) {
382+
(strpos($field, '.') !== false && ! empty(dot_array_search($field, $data))) ||
383+
(array_key_exists($field, $data) && ! empty($data[$field]))
384+
)
385+
{
385386
$requiredFields[] = $field;
386387
}
387388
}

0 commit comments

Comments
 (0)