You are here

protected function WebformEntityElementsValidator::validateRequired in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/WebformEntityElementsValidator.php \Drupal\webform\WebformEntityElementsValidator::validateRequired()

Validate elements are required.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup|null If not valid an error message.

1 call to WebformEntityElementsValidator::validateRequired()
WebformEntityElementsValidator::validate in src/WebformEntityElementsValidator.php
Validate webform elements.

File

src/WebformEntityElementsValidator.php, line 230

Class

WebformEntityElementsValidator
Webform elements validator.

Namespace

Drupal\webform

Code

protected function validateRequired() {
  return empty($this->elementsRaw) ? $this
    ->t('Elements are required') : NULL;
}