function contact_mail_page_validate in Drupal 6
Same name and namespace in other branches
- 4 modules/contact.module \contact_mail_page_validate()
- 5 modules/contact/contact.module \contact_mail_page_validate()
Validate the site-wide contact page form submission.
File
- modules/
contact/ contact.pages.inc, line 106 - User page callbacks for the contact module.
Code
function contact_mail_page_validate($form, &$form_state) {
if (!$form_state['values']['cid']) {
form_set_error('cid', t('You must select a valid category.'));
}
if (!valid_email_address($form_state['values']['mail'])) {
form_set_error('mail', t('You must enter a valid e-mail address.'));
}
}