protected function WebformSubmissionConditionsValidator::validateFormRecursive in Webform 8.5
Same name and namespace in other branches
- 6.x src/WebformSubmissionConditionsValidator.php \Drupal\webform\WebformSubmissionConditionsValidator::validateFormRecursive()
Recurse through a form and validate visible elements.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
1 call to WebformSubmissionConditionsValidator::validateFormRecursive()
File
- src/
WebformSubmissionConditionsValidator.php, line 314
Class
- WebformSubmissionConditionsValidator
- Webform submission conditions (#states) validator.
Namespace
Drupal\webformCode
protected function validateFormRecursive(array $form, FormStateInterface $form_state) {
foreach ($form as $key => $element) {
if (!WebformElementHelper::isElement($element, $key) || !WebformElementHelper::isAccessibleElement($element)) {
continue;
}
$this
->validateFormElement($element, $form_state);
$this
->validateFormRecursive($element, $form_state);
}
}