You are here

function email_confirm_admin_settings_validate in Email Change Confirmation 6

Same name and namespace in other branches
  1. 5 email_confirm.module \email_confirm_admin_settings_validate()
  2. 7 email_confirm.module \email_confirm_admin_settings_validate()

Admin settings validate

File

./email_confirm.module, line 100

Code

function email_confirm_admin_settings_validate($form, $form_state) {
  if (!empty($form_state['values']['email_confirm_confirmation_email_author']) && !valid_email_address($form_state['values']['email_confirm_confirmation_email_author'])) {
    form_set_error('email_confirm_confirmation_email_author', t('You must enter a valid email address for the "Email address change request email author" setting.'));
  }
  if (!empty($form_state['values']['email_confirm_confirmation_email_bcc']) && !valid_email_address($form_state['values']['email_confirm_confirmation_email_bcc'])) {
    form_set_error('email_confirm_confirmation_email_bcc', t('You must enter a valid email address for the "Email address change request email BCC email address" setting.'));
  }
}