function EntityReference::validateRequired
Validates that a required field for a sub handler has a value.
Parameters
array $element: The cardinality form render array.
\Drupal\Core\Form\FormStateInterface $form_state: The form state.
File
-
core/
modules/ views/ src/ Plugin/ views/ filter/ EntityReference.php, line 314
Class
- EntityReference
- Filters a view by entity references.
Namespace
Drupal\views\Plugin\views\filterCode
public static function validateRequired(array &$element, FormStateInterface $form_state) : void {
if (!empty($element['value'])) {
return;
}
// Config extra handler does not output validation messages and
// closes the modal with no feedback to the user.
// @todo https://www.drupal.org/project/drupal/issues/3163740.
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.