You are here

function simplenews_admin_newsletter_form_validate in Simplenews 7.2

Form validation callback for a newsletter form.

File

includes/simplenews.admin.inc, line 597
Newsletter admin, subscription admin, simplenews settings

Code

function simplenews_admin_newsletter_form_validate($form, &$form_state) {
  if ($form_state['clicked_button']['#value'] != t('Delete')) {

    // Check for valid email address.
    if (!valid_email_address($form_state['values']['from_address'])) {
      form_set_error('from_address', t("The sender's email address you supplied is not valid."));
    }
  }
}