protected function YamlFormEntityElementsValidator::validateRequired in YAML Form 8
Validate elements are required.
Return value
\Drupal\Core\StringTranslation\TranslatableMarkup|null If not valid an error message.
1 call to YamlFormEntityElementsValidator::validateRequired()
- YamlFormEntityElementsValidator::validate in src/
YamlFormEntityElementsValidator.php - Validate form elements.
File
- src/
YamlFormEntityElementsValidator.php, line 121
Class
- YamlFormEntityElementsValidator
- Defines a class to validate form elements.
Namespace
Drupal\yamlformCode
protected function validateRequired() {
return empty($this->elementsRaw) ? $this
->t('Elements are required') : NULL;
}