You are here

function bynder_form_validate in Bynder 7

Validates the Bynder portal url.

File

includes/bynder.admin.inc, line 265

Code

function bynder_form_validate($form, &$form_state) {
  if ($form_state['values']['bynder_url']) {
    $form_state['values']['bynder_url'] = trim($form_state['values']['bynder_url']);
    if (!filter_var($form_state['values']['bynder_url'], FILTER_VALIDATE_URL)) {
      form_set_error('bynder_url', t('Bynder url is not a valid url.'));
    }
  }
}