function block_box_add_validate in Drupal 4
File
- modules/
block.module, line 467 - Controls the boxes that are displayed around the main content.
Code
function block_box_add_validate($form_id, $form_values) {
if (empty($form_values['info']) || db_num_rows(db_query("SELECT info FROM {boxes} WHERE info = '%s'", $form_values['info']))) {
form_set_error('info', t('Please ensure that each block description is unique.'));
}
}