You are here

function swiftmailer_admin_messages_form_validate in Swift Mailer 7

Validate handler for swiftmailer_admin_messages_form($form, &$form_state).

File

includes/pages/swiftmailer_admin_messages.inc, line 138
An administration page which allows for configuration of how messages are to be formatted.

Code

function swiftmailer_admin_messages_form_validate($form, &$form_state) {
  if (!empty($form_state['values']['sender']['email'])) {
    if (!valid_email_address($form_state['values']['sender']['email'])) {
      form_set_error('sender][email', t('Invalid email address'));
    }
  }
}