private function validateDiscountAmount()
 {
     if (!helpers\Helper::isInt($this->discount_amount)) {
         $this->errors['discount_amount'] = 'Discount amount value must be int.';
     } elseif (!helpers\Helper::validatePercentAmount($this->discount_amount)) {
         $this->errors['discount_amount'] = 'Discount amount value must be int between 1-100.';
     }
 }
Пример #2
0
 private function validateCityId()
 {
     if (!helpers\Helper::isInt($this->city_id)) {
         $this->errors['city_id'] = 'City value must be int.';
     }
 }
Пример #3
0
 private function validateCountry()
 {
     if (!helpers\Helper::isInt($this->country_id)) {
         $this->errors['country_id'] = 'Country id value must be int.';
     }
 }
Пример #4
0
 private function validateCurrencyId()
 {
     if (!helpers\Helper::isInt($this->currency_id)) {
         $this->errors['currency_id'] = 'Currency ID value must be int.';
     }
 }