function contact_attach_contact_mail_page_validate in Contact Attach 5
Same name and namespace in other branches
- 6 contact_attach.module \contact_attach_contact_mail_page_validate()
Override contact_mail_page_validate().
Parameters
form_id: A unique string identifying the form.
form_values: The contents of the form fields.
File
- ./
contact_attach.module, line 247 - This is the main code file for the Contact attach module. This module gives users the ability of attaching one or more files to e-mails sent using the site-wide contact form.
Code
function contact_attach_contact_mail_page_validate($form_id, $form_values) {
if (!$form_values['cid']) {
form_set_error('category', t('You must select a valid category.'));
}
if (!valid_email_address($form_values['mail'])) {
form_set_error('mail', t('You must enter a valid e-mail address.'));
}
_contact_attach_upload_validate($form_id, $form_values);
}