1 node.block.inc | NodeBlock::formValidate($form, &$form_state) |
Validates the form settings.
Overrides Block::formValidate
File
- core/
modules/ node/ node.block.inc, line 205 - A class that displays a particular node in a block.
Class
- NodeBlock
- @file A class that displays a particular node in a block.
Code
function formValidate($form, &$form_state) {
parent::formValidate($form, $form_state);
module_load_include('inc', 'node', 'node.pages');
if ($nid = node_autocomplete_validate($form_state['values']['nid'])) {
$form_state['values']['nid'] = $nid;
}
else {
form_error($form['nid'], t('Sorry, no content matching <em>%title</em> was found.', array('%title' => $form_state['values']['nid'])));
}
}