You are here

protected function WebformComputedBase::prepareElementValidateCallbacks in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/WebformElement/WebformComputedBase.php \Drupal\webform\Plugin\WebformElement\WebformComputedBase::prepareElementValidateCallbacks()

Prepare an element's validation callbacks.

Parameters

array $element: An element.

\Drupal\webform\WebformSubmissionInterface $webform_submission: A webform submission.

Overrides WebformElementBase::prepareElementValidateCallbacks

File

src/Plugin/WebformElement/WebformComputedBase.php, line 85

Class

WebformComputedBase
Provides a base class for 'webform_computed' elements.

Namespace

Drupal\webform\Plugin\WebformElement

Code

protected function prepareElementValidateCallbacks(array &$element, WebformSubmissionInterface $webform_submission = NULL) {
  parent::prepareElementValidateCallbacks($element, $webform_submission);
  $element['#element_validate'][] = [
    get_class($this),
    'validateWebformComputed',
  ];
}