You are here

function fastly_setup_form_validate in Fastly 7.2

Same name and namespace in other branches
  1. 7 fastly.admin.inc \fastly_setup_form_validate()

Implements hook_form_validate().

File

./fastly.admin.inc, line 387
Administrative forms for Fastly module.

Code

function fastly_setup_form_validate($form, &$form_state) {
  $api = fastly_get_api($form_state['values']['fastly_api_key']);
  if (!$api
    ->validate()) {
    form_set_error('', t('Invalid API key.'));
  }
  fastly_help_message();
}