You are here

function twitter_non_auth_account_form_validate in Twitter 7.6

Same name and namespace in other branches
  1. 6.5 twitter.pages.inc \twitter_non_auth_account_form_validate()
  2. 7.5 twitter.pages.inc \twitter_non_auth_account_form_validate()

Form validation for adding a new non-authenticated Twitter account.

File

./twitter.pages.inc, line 580
Page callbacks for Twitter module.

Code

function twitter_non_auth_account_form_validate($form, &$form_state) {
  $screen_name = $form_state['values']['screen_name'];
  if (twitter_account_load($screen_name)) {
    form_set_error('screen_name', t('The Twitter account <em>@screen_name</em> has been added already.', array(
      '@screen_name' => $screen_name,
    )));
  }
}