abuse_report_form_validate($form_id, $form_values)
abuse/abuse.module, line 596
A hook to validate abuse_report_form
$form_id self explanatory
$form_values values of the form fields
<?php
function abuse_report_form_validate($form_id, $form_values) {
if (empty($form_values['name'])) {
form_set_error('name', t('<em>!field</em> is required', array('!field' => t('from'))));
}
if (empty($form_values['mail']) || !valid_email_address($form_values['mail'])) {
form_set_error('mail', t('a valid email address is required'));
}
if (empty($form_values['reason']) && $form_values['op'] != t('cancel')) {
form_set_error('reason', t('please give a reason'));
}
}
?>