You are here

public function SelectionInterface::validateAutocompleteInput in Entity reference 8

Validate Input from autocomplete widget that has no Id.

Parameters

$input: Single string from autocomplete widget.

$element: The form element to set a form error.

Return value

Value of a matching entity id, or NULL if none.

See also

_entityreference_autocomplete_validate()

2 methods override SelectionInterface::validateAutocompleteInput()
SelectionBase::validateAutocompleteInput in lib/Drupal/entityreference/Plugin/entityreference/selection/SelectionBase.php
Implements EntityReferenceHandler::validateAutocompleteInput().
SelectionBroken::validateAutocompleteInput in lib/Drupal/entityreference/Plugin/Type/Selection/SelectionBroken.php
Validate Input from autocomplete widget that has no Id.

File

lib/Drupal/entityreference/Plugin/Type/Selection/SelectionInterface.php, line 52
Definition of Drupal\entityreference\Plugin\Type\Selection\SelectionInterface.

Class

SelectionInterface
Interface definition for entityre-ference selection plugins.

Namespace

Drupal\entityreference\Plugin\Type\Selection

Code

public function validateAutocompleteInput($input, &$element, &$form_state, $form);