Created
January 7, 2015 19:50
-
-
Save lorenzo/c5acad6b34782691bfde to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function buildRules(RulesChecker $rules) { | |
$rules->add( | |
function ($entity) { | |
$errors = $this->validator('special')->errors($entity->toArray(), $entity->isNew()); | |
$entity->errors($errors); | |
return !$errors; | |
}); | |
return $rules; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment