You are here

function shariff_settings_validate in Shariff Social Media Buttons 7

Form validation handler for shariff_settings_form().

See also

shariff_settings_form()

1 string reference to 'shariff_settings_validate'
shariff_settings_form in ./shariff.module
Admin settings menu callback.

File

./shariff.module, line 269
Integrating Shariff library, providing settings form and block.

Code

function shariff_settings_validate($form_id, &$form_state) {
  $backend_url = $form_state['values']['shariff_backend_url'];
  if ($backend_url && !valid_url($backend_url, TRUE)) {
    form_set_error('shariff_backend_url', t('Please enter a valid URL.'));
  }
}