You are here

function simplenews_block_form_validate in Simplenews 5

Same name and namespace in other branches
  1. 6.2 includes/simplenews.subscription.inc \simplenews_block_form_validate()
  2. 6 simplenews.module \simplenews_block_form_validate()
  3. 7.2 includes/simplenews.subscription.inc \simplenews_block_form_validate()
  4. 7 includes/simplenews.subscription.inc \simplenews_block_form_validate()

Forms API callback; handles block form (un)subscribe validation.

File

./simplenews.module, line 1121

Code

function simplenews_block_form_validate($form_id, $form_values) {
  if (!valid_email_address($form_values['mail'])) {
    form_set_error('mail', t("The e-mail address you supplied is not valid."));
  }
}