Skip to content

Commit

Permalink
Merge branch 'v3.x' of https://github.com/leafsphp/form into v3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Nov 8, 2024
2 parents 20e5a28 + 9a5ce0a commit c8e10ba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ public function validate(array $dataSource, array $validationSet)
foreach ($validationSet as $itemToValidate => $userRules) {
if (empty($userRules)) {
$output[$itemToValidate] = Anchor::deepGetDot($dataSource, $itemToValidate);

continue;
}

Expand All @@ -286,7 +287,7 @@ public function validate(array $dataSource, array $validationSet)

if (!$this->test($userRules, $value, $itemToValidate)) {
$output = false;
} else if ($output !== false && !$endsWithWildcard) {
} elseif ($output !== false && !$endsWithWildcard) {
if (
(is_array($userRules) && in_array('optional', $userRules))
|| (is_string($userRules) && strpos($userRules, 'optional') !== false)
Expand Down

0 comments on commit c8e10ba

Please sign in to comment.