[documentation] [Documentation bug] Description of the nodeapi 'validate' action is inaccurate in 4.7 api

toemaz drupal-docs at drupal.org
Fri Nov 3 13:01:25 UTC 2006


Issue status update for 
http://drupal.org/node/92722
Post a follow up: 
http://drupal.org/project/comments/add/92722

 Project:      Documentation
 Version:      <none>
 Component:    Developer Guide
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  toemaz
 Updated by:   toemaz
 Status:       active

Source: http://api.drupal.org/api/4.7/function/hook_nodeapi


Quote:
"validate": The user has just finished editing the node and is trying
to preview or submit it. This hook can be used to check or even modify
the node. Errors should be set with form_set_error().


This is not correct. The validate action can only be used to check the
submitted form variables. The submit action should be used to modify the
node.


Proposed solution:  Add the submit action in the list.
"validate": The user has just finished editing the node and is trying
to preview or submit it. This hook can be used to check the node. Errors
should be set with form_set_error().

"submit": The user is about to submit the node. This hook can be used
to modify the node.




toemaz



More information about the documentation mailing list