function hook_node_validate


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 node.api.php hook_node_validate($node, $form, &$form_state)
cle7 node.api.php hook_node_validate($node, $form, &$form_state)
elmsmedia7 node.api.php hook_node_validate($node, $form, &$form_state)
icor7 node.api.php hook_node_validate($node, $form, &$form_state)
meedjum_blog7 node.api.php hook_node_validate($node, $form, &$form_state)
mooc7 node.api.php hook_node_validate($node, $form, &$form_state)

Perform node validation before a node is created or updated.

This hook is invoked from node_validate(), after a user has has finished editing the node and is previewing or submitting it. It is invoked at the end of all the standard validation steps, and after the type-specific hook_validate() is invoked.

To indicate a validation error, use form_set_error().

Note: Changes made to the $node object within your hook implementation will have no effect. The preferred method to change a node's content is to use hook_node_presave() instead. If it is really necessary to change the node at the validate stage, you can use form_set_value().


$node: The node being validated.

$form: The form being used to edit the node.

$form_state: The form state array.

Related topics

5 functions implement hook_node_validate()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

feeds_node_validate in sites/all/modules/ulmus/feeds/feeds.module
Implements hook_node_validate().
forum_node_validate in modules/forum/forum.module
Implements hook_node_validate().
scheduler_node_validate in sites/all/modules/ulmus/scheduler/scheduler.module
Implements hook_node_validate().
translation_node_validate in modules/translation/translation.module
Implements hook_node_validate().
unique_field_node_validate in sites/all/modules/ulmus/unique_field/unique_field.module
Implements hook_node_validate().
2 invocations of hook_node_validate()
field_attach_validate in modules/field/
Perform field validation against the field data in an entity.
node_validate in modules/node/node.module
Implements hook_validate().


modules/node/node.api.php, line 768
Hooks provided by the Node module.


function hook_node_validate($node, $form, &$form_state) {
  if (isset($node->end) && isset($node->start)) {
    if ($node->start > $node->end) {
      form_set_error('time', t('An event may not end before it starts.'));



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.