You are here

function mail_debugger_callback_valid_custom_mail in Mail Debugger 7

Same name and namespace in other branches
  1. 7.2 includes/mail_debugger.callback.inc \mail_debugger_callback_valid_custom_mail()

Validate function for mail_debugger_callback_submit_custom_mail()

_state

Parameters

array $form:

1 string reference to 'mail_debugger_callback_valid_custom_mail'
mail_debugger_callback in includes/mail_debugger.callback.inc
Callback for drupal_get_form

File

includes/mail_debugger.callback.inc, line 149

Code

function mail_debugger_callback_valid_custom_mail($form, &$form_state) {

  // is the entered e-mail adres valid?
  if (!valid_email_address($form_state['values']['custom']['to'])) {
    form_set_error('custom][to', 'Invalid e-mail address');
  }
}