You are here

function saml_sp_drupal_login__request_access_validate in SAML Service Provider 7.8

Same name and namespace in other branches
  1. 7.2 modules/saml_sp_drupal_login/saml_sp_drupal_login.pages.inc \saml_sp_drupal_login__request_access_validate()
  2. 7.3 modules/saml_sp_drupal_login/saml_sp_drupal_login.pages.inc \saml_sp_drupal_login__request_access_validate()

File

modules/saml_sp_drupal_login/saml_sp_drupal_login.pages.inc, line 41

Code

function saml_sp_drupal_login__request_access_validate($form, &$form_state) {
  if (!valid_email_address($form_state['values']['email'])) {
    form_set_error('email', t('You have provided an invalid email address.'));
  }
  if (empty($form_state['values']['explanation'])) {
    form_set_error('explanation', t('You must provide an explanation of why you think you need access to the site.'));
  }
  if (empty($form_state['values']['name'])) {
    form_set_error('name', t('You must provide an name so site administrators jnow who you are.'));
  }
}