You are here

function tweet_admin_validate in Tweet 5.2

Validation handler for tweet_admin().

See also

tweet_admin()

tweet_admin_validate()

File

./tweet.module, line 458
Builds links to post pages to twitter.

Code

function tweet_admin_validate($form_id, $form_values) {
  if ($form_values['tweet_service'] == $form_values['tweet_service_backup'] && $form_values['tweet_service_backup'] != 'none') {
    form_set_error('tweet_service_backup', t('You must select a backup abbreviation service that is different than your primary service.'));
  }
  if ($form_values['tweet_service'] == 'none' && $form_values['tweet_service_backup'] != 'none') {
    drupal_set_message(t('You have selected a backup URL abbreviation service, but no primary service.  Your URLs will not be abbreviated with these settings.'));
  }
}