function BookAdminEditForm::validateForm
Overrides FormBase::validateForm
File
- 
              core/
modules/ book/ src/ Form/ BookAdminEditForm.php, line 98  
Class
- BookAdminEditForm
 - Provides a form for administering a single book's hierarchy.
 
Namespace
Drupal\book\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
  if ($form_state->getValue('tree_hash') != $form_state->getValue('tree_current_hash')) {
    $form_state->setErrorByName('', $this->t('This book has been modified by another user, the changes could not be saved.'));
  }
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.