You are here

public function AddressFieldItemList::defaultValuesFormValidate in Address 8

Validates the submitted default value.

Invoked from \Drupal\field_ui\Form\FieldConfigEditForm to allow administrators to configure instance-level default value.

Parameters

array $element: The default value form element.

array $form: The form where the settings form is being included in.

\Drupal\Core\Form\FormStateInterface $form_state: The form state of the (entire) configuration form.

Overrides FieldItemList::defaultValuesFormValidate

File

src/Plugin/Field/FieldType/AddressFieldItemList.php, line 16

Class

AddressFieldItemList
Defines the 'address' field item list class.

Namespace

Drupal\address\Plugin\Field\FieldType

Code

public function defaultValuesFormValidate(array $element, array &$form, FormStateInterface $form_state) {

  // Skip validation on the default value form.
  // This allows setting an incomplete address as the default value.
}