You are here

function sharemessage_validate_twitter_card_requirements in Share Message 7

Validate handler to ensure twitter user is available when cards are enabled.

1 string reference to 'sharemessage_validate_twitter_card_requirements'
sharemessage_addthis_settings in ./sharemessage.module
Implements hook_sytem_settings().

File

./sharemessage.module, line 557
New Sharing Module.

Code

function sharemessage_validate_twitter_card_requirements($element, &$form_state) {
  if (!empty($form_state['values']['sharemessage_add_twitter_card']) && empty($form_state['values']['sharemessage_twitter_user'])) {
    form_error($element, t('Please enter your twitter account username in order to activate meta tags for twitter cards.'));
  }
}