abuse_admin_configure_reasons_validate

Definition

abuse_admin_configure_reasons_validate($form_id, $form_values)
abuse/abuse.module, line 311

Code

<?php
function abuse_admin_configure_reasons_validate($form_id, $form_values) {
  if ($form_values['op'] == t('add')) {
    if (empty ($form_values['short_form'])) {
      form_set_error('short_form', t('You MUST provide a reason.'));
    } 
    elseif (empty($form_values['description'])) {
      form_set_error('description', t('You MUST provide a description of the reason.'));
    } 
    elseif (empty($form_values['email_notice'])) {
      form_set_error('email_notice', t('You MUST provide an email notice that may be sent to the user for this reason.'));
    }
  } 
  elseif ($form_values['op'] != t('remove')) {
    form_set_error('', t('An invalid option was chosen.'));
  }
}
?>