You are here

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

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

File

ldap_query/LdapQueryAdmin.class.php, line 258

Class

LdapQueryAdmin

Code

public function drupalFormValidate($op, $values) {
  $errors = [];
  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;
}