You are here

function flickr_shown_block_validate in Flickr 7

Validate user input on 'number shown'.

1 string reference to 'flickr_shown_block_validate'
flickr_block_configure in block/flickr_block.module
Implements hook_block_configure().

File

block/flickr_block.module, line 604
The Flickr block module

Code

function flickr_shown_block_validate($element) {
  if (!is_numeric($element['#value']) || $element['#value'] < 1) {
    form_set_error('flickr_block_{$delta}_show_n', t('<strong>Show <em>n</em> photos</strong>: Set a number from 1 to 99.'));
  }
}