You are here

function simple_mail_admin_form_validate in Simple Mail 7

Simple Mail configuration form validate callback.

File

includes/simple_mail.admin.inc, line 35
Simple Mail admin forms.

Code

function simple_mail_admin_form_validate($form, &$form_state) {
  $mail = $form_state['values']['simple_mail_override'];
  if ($mail !== '' && !valid_email_address($mail)) {
    form_set_error('simple_mail_override', t('Please enter a valid email address.'));
  }
}