You are here

function photos_node_validate in Album Photos 7.3

Implements hook_node_validate().

File

./photos.module, line 786
Implementation of photos.module.

Code

function photos_node_validate($node, $form, &$form_state) {
  if ($node->type == 'photos') {
    $t = photos_user_count();
    isset($t['rest']) && arg(2) != 'edit' ? form_set_error('title', t('You cannot create more albums.')) : NULL;
  }
}