You are here

function user_relationships_block_num_rels_validate in User Relationships 5

Validate settings on the block configuration page(s)

File

./user_relationships_actions.inc, line 222

Code

function user_relationships_block_num_rels_validate($form) {
  $num_rels = $form['#value'];
  if (!is_numeric($num_rels) || (int) $num_rels != $num_rels || (int) $num_rels <= 0) {
    form_set_error('user_relationships_block_num_rels', t('Number of users must be an integer greater than 0.'));
    return FALSE;
  }
  return TRUE;
}