diff --git a/src/Form.php b/src/Form.php index d9e7043..f6853d7 100644 --- a/src/Form.php +++ b/src/Form.php @@ -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; } @@ -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)