function mailchimp_validate_email in Mailchimp 7.5
Same name and namespace in other branches
- 8 mailchimp.module \mailchimp_validate_email()
- 7.4 mailchimp.module \mailchimp_validate_email()
- 2.x mailchimp.module \mailchimp_validate_email()
Form element validation for email input of #type 'textfield'.
Note: #maxlength and #required are validated by _form_validate() already.
1 string reference to 'mailchimp_validate_email'
- mailchimp_insert_drupal_form_tag in ./
mailchimp.module - Convert mailchimp form elements to Drupal Form API.
File
- ./
mailchimp.module, line 1902 - Mailchimp module.
Code
function mailchimp_validate_email(&$element, &$form_state) {
if ($element['#value'] && !valid_email_address($element['#value'])) {
form_error($element, t('"%mail" is not a valid email address.', array(
'%mail' => $element['#value'],
)));
}
}