You are here

function hosting_client_user_form_validate in Hosting 7.3

Same name and namespace in other branches
  1. 5 client/hosting_client.access.inc \hosting_client_user_form_validate()
  2. 6.2 client/hosting_client.access.inc \hosting_client_user_form_validate()
  3. 7.4 client/hosting_client.access.inc \hosting_client_user_form_validate()

Validate the submission of a user form.

See also

hosting_client_user()

1 string reference to 'hosting_client_user_form_validate'
hosting_client_form_user_profile_form_alter in client/hosting_client.access.inc
Implements hook_form_FORM_ID_alter().

File

client/hosting_client.access.inc, line 170
Control client node access.

Code

function hosting_client_user_form_validate($form, &$form_state) {
  if (array_key_exists('hosting_client', $form_state['values']) && $form_state['values']['hosting_client'] && !($client = hosting_get_client($form_state['values']['hosting_client']))) {
    form_set_error('hosting_client', 'Please fill in a valid client');
  }
}