function block_add_block_form_validate

7.x block.admin.inc block_add_block_form_validate($form, &$form_state)
6.x block.admin.inc block_add_block_form_validate($form, &$form_state)

File

drupal-6.x/modules/block/block.admin.inc, line 295
Admin page callbacks for the block module.

Code

function block_add_block_form_validate($form, &$form_state) {
  if (empty($form_state['values']['info']) || db_result(db_query("SELECT COUNT(*) FROM {boxes} WHERE info = '%s'", $form_state['values']['info']))) {
    form_set_error('info', t('Please ensure that each block description is unique.'));
  }
}