Exemplo n.º 1
0
 private function validateAddress()
 {
     if (helpers\Helper::isEmpty($this->address)) {
         $this->errors['address'] = 'Address can not be empty.';
     } elseif (!helpers\Helper::isString($this->address)) {
         $this->errors['address'] = 'Address must be a string value.';
     }
 }
Exemplo n.º 2
0
 private function validateEmployerName()
 {
     if (helpers\Helper::isEmpty($this->employee_name)) {
         $this->errors['employee_name'] = 'Employer name can not be empty.';
     } elseif (!helpers\Helper::isString($this->employee_name)) {
         $this->errors['employee_name'] = 'Employer name must be a string value.';
     }
 }
Exemplo n.º 3
0
 private function validateZip()
 {
     if (helpers\Helper::isEmpty($this->zip)) {
         $this->errors['zip'] = 'Zip code can not be empty.';
     } elseif (!helpers\Helper::isString($this->zip)) {
         $this->errors['zip'] = 'Zip code must be a string value.';
     }
 }
Exemplo n.º 4
0
 private function validateName()
 {
     if (helpers\Helper::isEmpty($this->name)) {
         $this->errors['name'] = 'Currency name can not be empty.';
     } elseif (!helpers\Helper::isString($this->name)) {
         $this->errors['name'] = 'Currency must be a string value.';
     }
 }
Exemplo n.º 5
0
 private function validateProductDecription()
 {
     if (helpers\Helper::isEmpty($this->product_description)) {
         $this->errors['product_description'] = 'Decription name can not be empty.';
     } elseif (!helpers\Helper::isString($this->product_description)) {
         $this->errors['product_description'] = 'Decription must be a string value.';
     }
 }
Exemplo n.º 6
0
 private function validateState()
 {
     if (helpers\Helper::isEmpty($this->state)) {
         $this->errors['state'] = 'State name can not be empty.';
     } elseif (!helpers\Helper::isString($this->state)) {
         $this->errors['state'] = 'State must be a string value.';
     }
 }
Exemplo n.º 7
0
 private function validateOrderIp()
 {
     if (helpers\Helper::isEmpty($this->ip)) {
         $this->errors['ip'] = 'IP address can not be empty';
     }
     if (!helpers\Helper::isValidIpAddress(long2ip($this->ip))) {
         $this->errors['ip'] = 'IP address is not valid';
     }
 }