function node_form_validate

node_form_validate($form, &$form_state)

Form validation handler for node_form().

See also

node_form()

node_form_submit()

File

modules/node/ node.pages.inc, line 89
Page callbacks for adding, editing, deleting, and revisions management for content.

Code

function node_form_validate($form, &$form_state) {
  // $form_state['node'] contains the actual entity being edited, but we must
  // not update it with form values that have not yet been validated, so we
  // create a pseudo-entity to use during validation.
  $node = (object) $form_state['values'];
  node_validate($node, $form, $form_state);
  entity_form_field_validate('node', $form, $form_state);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!node!node.pages.inc/function/node_form_validate/7.x