You are here

function node_form_validate in Drupal 7

Same name and namespace in other branches
  1. 4 modules/node.module \node_form_validate()
  2. 5 modules/node/node.module \node_form_validate()
  3. 6 modules/node/node.pages.inc \node_form_validate()

Form validation handler for node_form().

See also

node_form()

node_form_submit()

1 string reference to 'node_form_validate'
node_form in modules/node/node.pages.inc
Form constructor for the node add/edit form.

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);
}