function contact_site_form_validate

Form validation handler for contact_site_form().

See also

contact_site_form_submit()

File

modules/contact/contact.pages.inc, line 119

Code

function contact_site_form_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.'));
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.