You are here

function system_send_email_action_validate in Drupal 6

Same name and namespace in other branches
  1. 7 modules/system/system.module \system_send_email_action_validate()

Validate system_send_email_action form submissions.

File

modules/system/system.module, line 1705
Configuration system that lets administrators modify the workings of the site.

Code

function system_send_email_action_validate($form, $form_state) {
  $form_values = $form_state['values'];

  // Validate the configuration form.
  if (!valid_email_address($form_values['recipient']) && $form_values['recipient'] != '%author') {

    // We want the literal %author placeholder to be emphasized in the error message.
    form_set_error('recipient', t('Please enter a valid email address or %author.', array(
      '%author' => '%author',
    )));
  }
}