You are here

function flickr_userid_block_validate in Flickr 6

Same name and namespace in other branches
  1. 7 block/flickr_block.module \flickr_userid_block_validate()

Validate user input. Validate user input on 'user Flickr ID'.

1 string reference to 'flickr_userid_block_validate'
flickr_block in block/flickr_block.module
Implements hook_block().

File

block/flickr_block.module, line 447

Code

function flickr_userid_block_validate($element) {
  $uid = trim($element['#value']);
  if ($uid) {
    $user = flickr_user_find_by_identifier($uid);
    if (!$user) {
      form_set_error('flickr_block_{$delta}_user_id', t('<strong>Flickr User Id</strong>: %uid does not appear to be a valid Flickr user.', array(
        '%uid' => $uid,
      )));
    }
  }
}