Skip to content

Commit

Permalink
Merge pull request #3 from thefreshuk/fix/bypassValidation
Browse files Browse the repository at this point in the history
fix: completely bypasses validation if true
  • Loading branch information
jwdunne authored Jan 21, 2021
2 parents caf95d9 + e3dd78e commit c8f3ac9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/MessageValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ public function __construct(
*/
public function validate(Message $message)
{
if ($this->bypassValidation) {
return;
}

if (self::isLambdaStyle($message)) {
$message = self::convertLambdaMessage($message);
}
Expand Down Expand Up @@ -125,10 +129,6 @@ public function validate(Message $message)
*/
public function isValid(Message $message)
{
if ($this->bypassValidation) {
return true;
}

try {
$this->validate($message);
return true;
Expand Down

0 comments on commit c8f3ac9

Please sign in to comment.