function book_admin_settings_validate

Form validation handler for book_admin_settings().

See also

book_admin_settings_submit()

1 string reference to 'book_admin_settings_validate'
book_admin_settings in modules/book/book.admin.inc
Form constructor for the book settings form.

File

modules/book/book.admin.inc, line 64

Code

function book_admin_settings_validate($form, &$form_state) {
    $child_type = $form_state['values']['book_child_type'];
    if (empty($form_state['values']['book_allowed_types'][$child_type])) {
        form_set_error('book_child_type', t('The content type for the %add-child link must be one of those selected as an allowed book outline type.', array(
            '%add-child' => t('Add child page'),
        )));
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.