You are here

function sheetnode_validate in Sheetnode 6

Same name and namespace in other branches
  1. 7.2 sheetnode.module \sheetnode_validate()
  2. 7 sheetnode.module \sheetnode_validate()

Implementation of hook_validate().

File

./sheetnode.module, line 145

Code

function sheetnode_validate($node, &$form) {
  $errors = form_get_errors();
  if (!empty($errors)) {
    _sheetnode_inject('sheetnode-' . (empty($form['nid']['#value']) ? 'new' : $form['nid']['#value']), 'sheetnode', $form['sheetnode']['value']['#value'], 'edit-sheetnode-value', array(
      'entity-type' => 'node',
      'oid' => $form['nid']['#value'],
    ));
  }
}