Пример #1
0
 /**
  * (non-PHPdoc)
  * 
  * @see \mithra62\Validate\RuleInterface::validate()
  * @ignore
  *
  */
 public function validate($field, $input, array $params = array())
 {
     $license = new m62License();
     return $license->validLicense($input);
 }
Пример #2
0
 /**
  * Verifies the license key is valid
  * 
  * @param string $license_key            
  * @param \JaegerApp\License $license            
  * @return \JaegerApp\Errors
  */
 public function licenseCheck($license_key, \JaegerApp\License $license)
 {
     if ($license_key == '') {
         $this->setError('license_number', 'missing_license_number');
     } else {
         if (!$license->validLicense($license_key)) {
             $this->setError('license_number', 'invalid_license_number');
         }
     }
     return $this;
 }