You are here

function merci_reservation_node_validate in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.2

Implementation of hook_validate().

2 string references to 'merci_reservation_node_validate'
merci_form in ./merci.module
Implementation of hook_form().
merci_staff_form_alter in modules/merci_staff/merci_staff.module

File

./merci.module, line 222
MERCI - Managed Equipment Reservation Checkout and Inventory

Code

function merci_reservation_node_validate($form, &$form_state) {
  if (!empty($form_state['ahah_submission'])) {
    return;
  }

  // No validation necessary on deletion.
  if ($form_state['triggering_element']['#id'] == 'edit-delete') {
    return;
  }

  // Do no validation if their errors from the main validation function.
  if (form_get_errors()) {
    return;
  }
  merci_validate_status($form, $form_state);
  merci_validate_merci_reservation_date($form, $form_state);

  // Tests for existing items.
  merci_validate_empty_reservation_items($form, $form_state);
  merci_validate_merci_selected_items($form, $form_state);
}