You are here

function webform_email_edit_form_validate in Webform 6.3

Same name and namespace in other branches
  1. 7.4 includes/webform.emails.inc \webform_email_edit_form_validate()
  2. 7.3 includes/webform.emails.inc \webform_email_edit_form_validate()

Validate handler for webform_email_edit_form().

1 string reference to 'webform_email_edit_form_validate'
webform_email_edit_form in includes/webform.emails.inc
Form for configuring an e-mail setting and template.

File

includes/webform.emails.inc, line 390
Provides interface and database handling for e-mail settings of a webform.

Code

function webform_email_edit_form_validate($form, &$form_state) {
  if ($form_state['values']['from_address_option'] == 'custom' && !valid_email_address($form_state['values']['from_address_custom'])) {
    form_set_error('from_address_custom', t('The entered e-mail address "@email" does not appear valid.', array(
      '@email' => $form_state['values']['from_address_custom'],
    )));
  }
}