FieldConfigBase::$required
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Field/FieldConfigBase.php \Drupal\Core\Field\FieldConfigBase::required
- 10 core/lib/Drupal/Core/Field/FieldConfigBase.php \Drupal\Core\Field\FieldConfigBase::required
- 11.x core/lib/Drupal/Core/Field/FieldConfigBase.php \Drupal\Core\Field\FieldConfigBase::required
Flag indicating whether the field is required.
TRUE if a value for this field is required when used with this bundle, FALSE otherwise. Currently, required-ness is only enforced at the Form API level in entity edit forms, not during direct API saves.
Type: bool
File
-
core/
lib/ Drupal/ Core/ Field/ FieldConfigBase.php, line 105
Class
- FieldConfigBase
- Base class for configurable field definitions.
Namespace
Drupal\Core\FieldCode
protected $required = FALSE;
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.