You are here

protected static function ListItemBase::validateAllowedValue in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php \Drupal\options\Plugin\Field\FieldType\ListItemBase::validateAllowedValue()

Checks whether a candidate allowed value is valid.

Parameters

string $option: The option value entered by the user.

Return value

string The error message if the specified value is invalid, NULL otherwise.

2 calls to ListItemBase::validateAllowedValue()
ListItemBase::extractAllowedValues in core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php
Extracts the allowed values array from the allowed_values element.
ListItemBase::validateAllowedValues in core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php
#element_validate callback for options field allowed values.
3 methods override ListItemBase::validateAllowedValue()
ListFloatItem::validateAllowedValue in core/modules/options/src/Plugin/Field/FieldType/ListFloatItem.php
Checks whether a candidate allowed value is valid.
ListIntegerItem::validateAllowedValue in core/modules/options/src/Plugin/Field/FieldType/ListIntegerItem.php
Checks whether a candidate allowed value is valid.
ListStringItem::validateAllowedValue in core/modules/options/src/Plugin/Field/FieldType/ListStringItem.php
Checks whether a candidate allowed value is valid.

File

core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php, line 225

Class

ListItemBase
Plugin base class inherited by the options field types.

Namespace

Drupal\options\Plugin\Field\FieldType

Code

protected static function validateAllowedValue($option) {
}