/** * @param Multiship_Order|null $order * @return bool */ function validate($order = null) { if (isset($order->user_status_id) && $order->user_status_id == ORDER_DRAFT_STATUS) { $this->_critical = array(); } else { $this->_critical = array("first_name", "last_name", "phone"); } return parent::validate(); }
/** * @param Multiship_Order|null $order * @return bool */ function validate($order = null) { if (isset($order->user_status_id) && $order->user_status_id == ORDER_DRAFT_STATUS) { $this->_critical = array(); } else { $this->_critical = array("city", "street", "house"); } return parent::validate(); }
function validate() { $validated = parent::validate(); if ($this->_wrongItem) { if (!$this->_wrongItem->validate()) { $validated = false; } } return $validated; }