You are here

public function LdapQueryAdmin::drupalFormValidate in Lightweight Directory Access Protocol (LDAP) 8.2

Same name and namespace in other branches
  1. 7.2 ldap_query/LdapQueryAdmin.class.php \LdapQueryAdmin::drupalFormValidate()
  2. 7 ldap_query/LdapQueryAdmin.class.php \LdapQueryAdmin::drupalFormValidate()

File

ldap_query/LdapQueryAdmin.class.php, line 232

Class

LdapQueryAdmin

Code

public function drupalFormValidate($op, $values) {
  $errors = array();
  if ($op == 'delete') {
    if (!$this->qid) {
      $errors['query_name_missing'] = 'Query name missing from delete form.';
    }
  }
  else {
    $this
      ->populateFromDrupalForm($op, $values);
    $errors = $this
      ->validate($op);
  }
  return $errors;
}