You are here

function clients_connection_test_form_validate in Web Service Clients 7

Same name and namespace in other branches
  1. 6.2 clients.connection.admin.inc \clients_connection_test_form_validate()
  2. 7.3 includes/clients.connection.admin.inc \clients_connection_test_form_validate()
  3. 7.2 clients.connection.admin.inc \clients_connection_test_form_validate()

Validate handler for the connection test page.

File

./clients.connection.admin.inc, line 335
clients.connection.admin.inc Page callbacks relating to client connection admin.

Code

function clients_connection_test_form_validate($form, &$form_state) {
  $connection = $form['#connection'];
  $button_key = $form_state['clicked_button']['#key'];

  // Only pass the method the values that are related to it; everything else is just cruft.
  $button_form_values = $form_state['values']['buttons'][$button_key];
  if (isset($form_state['clicked_button']['#action_validate'])) {
    $validate_handler = $form_state['clicked_button']['#action_validate'];
    $connection
      ->{$validate_handler}($button_form_values);
  }
}