You are here

public static function WebformSubmissionConditionsValidator::elementAfterBuild in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/WebformSubmissionConditionsValidator.php \Drupal\webform\WebformSubmissionConditionsValidator::elementAfterBuild()

Webform element #after_build callback: Wrap #element_validate so that we suppress element validation errors.

File

src/WebformSubmissionConditionsValidator.php, line 463

Class

WebformSubmissionConditionsValidator
Webform submission conditions (#states) validator.

Namespace

Drupal\webform

Code

public static function elementAfterBuild(array $element, FormStateInterface $form_state) {
  return WebformElementHelper::setElementValidate($element, [
    get_called_class(),
    'elementValidate',
  ]);
}