FieldConfigEditForm::validateForm

public FieldConfigEditForm::validateForm(array &$form, FormStateInterface $form_state)

Form validation handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormBase::validateForm

File

core/modules/field_ui/src/Form/FieldConfigEditForm.php, line 148

Class

FieldConfigEditForm
Provides a form for the field settings form.

Namespace

Drupal\field_ui\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  parent::validateForm($form, $form_state);

  if (isset($form['default_value'])) {
    $item = $form['#entity']->get($this->entity->getName());
    $item->defaultValuesFormValidate($form['default_value'], $form, $form_state);
  }
}
doc_Drupal
2016-10-29 09:11:05
Comments
Leave a Comment

Please login to continue.