system_send_email_action_validate

Versions
6 – 7
system_send_email_action_validate($form, $form_state)

Validate system_send_email_action form submissions.

Code

modules/system/system.module, line 1662

<?php
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')));
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.