Skip to content

Commit

Permalink
Additional fixes to 52f932b
Browse files Browse the repository at this point in the history
Signed-off-by: crynobone <[email protected]>
  • Loading branch information
crynobone committed Jun 20, 2013
1 parent 52f932b commit 7f20e48
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/Orchestra/Support/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function bind($bindings)
public function with($input, $events = array())
{
$rules = $this->getBindedRules();
$this->runValidationEvents($events);
$this->runValidationEvents($events, $rules);

return V::make($input, $rules->getAttributes());
}
Expand Down Expand Up @@ -138,13 +138,12 @@ protected function prepareBindings($prefix = '{', $suffix = '}')
* @param array $events
* @return void
*/
protected function runValidationEvents($events)
protected function runValidationEvents($events, $rules)
{
$events = array_merge($this->events, (array) $events);

foreach ((array) $events as $event)
{
Event::fire($event, array( & $this->rules));
Event::fire($event, array( & $rules));
}
}
}

0 comments on commit 7f20e48

Please sign in to comment.