abuse_admin_edit_reason_validate

Definition

abuse_admin_edit_reason_validate($form, &$form_state)
abuse/abuse.admin.inc, line 281

Code

<?php
function abuse_admin_edit_reason_validate($form, &$form_state) {
  $values = $form_state['values'];
  $op = $form_state['clicked_button']['#value'];
  if ($values['op'] == t('Save')) {
    if (empty ($values['short_form'])) {
      form_set_error('short_form', t('You MUST provide a reason.'));
    }
    elseif (empty($values['description'])) {
      form_set_error('description', t('You MUST provide a description of the reason.'));
    }
    elseif (empty($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.'));
    }
  }
}
?>