function BookSettingsForm::validateForm
Overrides ConfigFormBase::validateForm
File
- 
              core/modules/ book/ src/ Form/ BookSettingsForm.php, line 57 
Class
- BookSettingsForm
- Configure book settings for this site.
Namespace
Drupal\book\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
  $child_type = $form_state->getValue('book_child_type');
  if ($form_state->isValueEmpty([
    'book_allowed_types',
    $child_type,
  ])) {
    $form_state->setErrorByName('book_child_type', $this->t('The content type for the %add-child link must be one of those selected as an allowed book outline type.', [
      '%add-child' => $this->t('Add child page'),
    ]));
  }
  parent::validateForm($form, $form_state);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
