function ldap_query_admin_form_validate in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.2 ldap_query/ldap_query.admin.inc \ldap_query_admin_form_validate()
- 7 ldap_query/ldap_query.admin.inc \ldap_query_admin_form_validate()
Validate hook for the LDAP server form.
File
- ldap_query/
ldap_query.admin.inc, line 66 - Defines functions for administrative interface for servers.
Code
function ldap_query_admin_form_validate($form, &$form_state) {
$op = drupal_strtolower($form_state['clicked_button']['#value']);
ldap_servers_module_load_include('php', 'ldap_query', 'LdapQueryAdmin.class');
$server = new LdapQueryAdmin($form_state['values']['qid']);
$errors = $server
->drupalFormValidate($op, $form_state['values']);
foreach ($errors as $error_name => $error_text) {
form_set_error($error_name, t($error_text));
}
}