示例#1
0
 public function validate()
 {
     $input = new Input();
     $input->maximum($this->address, 64, 'Address');
     $input->maximum($this->city, 32, 'City');
     $input->digits($this->zip, 'Zip Code');
     $input->maximum($this->lastname, 32, 'Last Name');
     $input->maximum($this->firstname, 32, 'First Name');
     $input->maximum($this->companyname, 64, 'Company Name');
     return true;
 }
示例#2
0
 public function validate()
 {
     $input = new Input();
     $input->minMax($this->name, 1, 32, 'Company Name');
     $input->minMax($this->address, 1, 64, 'Address');
     $input->minMax($this->city, 1, 32, 'City');
     $input->minMax($this->state, 1, 32, 'State');
     $input->minMax($this->zip, 1, 14, 'Zip Code');
     $input->phone($this->phone, 'Telephone Number');
     $input->digits($this->zip, 'Zip Code');
     $input->maximum($this->phone, 32, 'Telephone Number');
     $input->maximum($this->logo, 128, 'Logo URL');
     return true;
 }
 private function validate_all()
 {
     $input = new Input();
     $elements = count($this->name);
     for ($i = 0; $i < $elements; $i++) {
         if ($this->required[$i]) {
             $this->required[$i] = 1;
         } else {
             $this->required[$i] = 0;
         }
         $input->alpha($this->name[$i], 'Variable Name ' . $i);
         $input->minMax($this->name[$i], 'Variable Name ' . $i);
         $input->minMax($this->description[$i], 1, 64, 'Variable Description ' . $i);
         $input->digits($this->planid[$i], 'Plan ID ' . $i);
     }
     return true;
 }
示例#4
0
 private function validate_all()
 {
     $input = new Input();
     $elements = count($this->name);
     for ($i = 0; $i < $elements - 1; $i++) {
         $input->minMax($this->name[$i], 1, 32, 'Plan Name');
         $input->minMax($this->description[$i], 1, 64, 'Plan Description');
         $input->money($this->price[$i], 'Plan Price');
         $input->digits($this->period[$i], 'Monthly Period');
         $input->boolean($this->hidden[$i], 'Hidden Option');
         if (!$this->plancolor[$i]) {
             $this->plancolor[$i] = '#99cccc';
         }
         $input->maximum($this->plancolor[$i], 32, 'Plan HTML Color Bar');
         if ($this->hidden) {
             $this->hidden = 1;
         } else {
             $this->hidden = 0;
         }
     }
     return true;
 }
示例#5
0
 public function validate()
 {
     $input = new Input();
     $input->maximum($this->address, 64, 'Address');
     $input->maximum($this->city, 32, 'City');
     $input->maximum($this->state, 32, 'State');
     $input->maximum($this->zip, 14, 'Zip Code');
     $input->phone($this->phone, 'Telephone Number');
     $input->digits($this->zip, 'Zip Code');
     $input->maximum($this->phone, 16, 'Telephone Number');
     $input->email($this->email, 'Email Address');
     $input->maximum($this->email, 128, 'Email Address');
 }