Skip to content

Commit

Permalink
Added fails() method to GroupedValidator
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Hayes committed Mar 10, 2014
1 parent 451867c commit 89bde1c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Crhayes/Validation/GroupedValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ public function passes()

return (count($this->errors)) ? false : true;
}

/**
* Perform a check to see if any of the validators have failed.
*
* @return boolean
*/
public function fails()
{
return ! $this->passes();
}

/**
* Return the combined errors from all validators.
Expand All @@ -88,4 +98,4 @@ public function errors()
{
return new \Illuminate\Support\MessageBag($this->errors);
}
}
}

0 comments on commit 89bde1c

Please sign in to comment.