public function LdapAuthorizationConsumerConfAdmin::drupalFormValidate in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_authorization/LdapAuthorizationConsumerConfAdmin.class.php \LdapAuthorizationConsumerConfAdmin::drupalFormValidate()
- 7 ldap_authorization/LdapAuthorizationConsumerConfAdmin.class.php \LdapAuthorizationConsumerConfAdmin::drupalFormValidate()
File
- ldap_authorization/
LdapAuthorizationConsumerConfAdmin.class.php, line 293
Class
- LdapAuthorizationConsumerConfAdmin
- LDAP Authorization Consumer Configration Admin Class
Code
public function drupalFormValidate($op, $values) {
$errors = array();
if ($op == 'delete') {
if (!$this->consumerType) {
$errors['consumer_type_missing'] = 'Consumer type is missing from delete form.';
}
}
else {
$this
->populateFromDrupalForm($op, $values);
$errors = $this
->validate($values);
if (count($this->mappings) == 0 && trim($values['mappings'])) {
$errors['mappings'] = t('Bad mapping syntax. Text entered but not able to convert to array.');
}
}
return $errors;
}