function shib_auth_custom_data_validate in Shibboleth Authentication 7.4
Same name and namespace in other branches
- 6.4 shib_auth_forms.inc \shib_auth_custom_data_validate()
Form validation handler for shib_auth_custom_data()
File
- ./
shib_auth_forms.inc, line 221 - Drupal forms of the Shibboleth authentication module.
Code
function shib_auth_custom_data_validate($form, &$form_state) {
if (shib_auth_config('enable_custom_mail') && empty($form_state['values']['custom_mail'])) {
form_set_error('', t("You have to fill the 'Email' field."));
}
if (shib_auth_config('define_username') && empty($form_state['values']['custom_username'])) {
form_set_error('', t("You have to fill the 'Username' field."));
}
if (shib_auth_config('terms_accept') && empty($form_state['values']['accept'])) {
form_set_error('', t('You have to accept Terms of Use to proceed.'));
}
}