You are here

function simplenews_admin_category_form_validate in Simplenews 7

Form validation callback for a newsletter category form.

File

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

Code

function simplenews_admin_category_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."));
    }
  }
}