You are here

function _nodesinblock_validate in Nodes In Block 6

Same name and namespace in other branches
  1. 7 nodesinblock.module \_nodesinblock_validate()

Function callback: validate node. Returns error if visibility is empty and status is enabled.

1 call to _nodesinblock_validate()
nodesinblock_nodeapi in ./nodesinblock.module
Implementation of hook_nodeapi().

File

./nodesinblock.module, line 283
Nodes in block makes it possible to add multiple nodes in one block.

Code

function _nodesinblock_validate($node) {
  $visibility = $node->nodesinblock_visibility;
  if ($node->nodesinblock_delta != -1 && empty($visibility)) {
    form_set_error('nodesinblock_visibility', t('Visibility field is required.'));
  }
}