block_box_add_validate

Versions
4.7
block_box_add_validate($form_id, $form_values)

Code

modules/block.module, line 467

<?php
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.'));
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.