Exemplo n.º 1
0
 /**
  * Validates a person object
  * 
  * @param ComPeopleDomainEntityPerson $person
  * 
  * @return boolean
  */
 public function validateEntity($person)
 {
     //if a password is set then validate the password
     if ($password = $person->getPassword()) {
         if (!$this->getFilter('password')->validate($password)) {
             $person->addError(array('message' => 'Invalid password format', 'code' => AnError::INVALID_FORMAT, 'key' => 'password'));
         }
     }
     return parent::validateEntity($person);
 }