hoook_validate documentation incorrect in several ways

mkruisselbrink - October 27, 2008 - 09:28
Project:Drupal
Version:6.x-dev
Component:documentation
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

The hook_validate documentation seems to be invalid in several ways. There is a paragraph that reads:

Changes made to the $node object within a hook_validate() function will have no effect. The preferred method to change a node's content is to use or hook_nodeapi($op='submit') instead. If it is really necessary to change the node at the validate stage, you can use function form_set_value().

However hook_nodeapi($op='submit') does not seem to exist, and also form_set_value is not an option, as from hook_validate you don't have access to a form_state variable you can change.

 
 

Drupal is a registered trademark of Dries Buytaert.