From e3dd78ecd8c9cad64fb456614542dd3e9ca3885e Mon Sep 17 00:00:00 2001 From: Panamus Date: Thu, 21 Jan 2021 11:00:31 +0000 Subject: [PATCH] fix: completely bypasses validation if true --- src/MessageValidator.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MessageValidator.php b/src/MessageValidator.php index 99d9f27..80537f4 100644 --- a/src/MessageValidator.php +++ b/src/MessageValidator.php @@ -84,6 +84,10 @@ public function __construct( */ public function validate(Message $message) { + if ($this->bypassValidation) { + return; + } + if (self::isLambdaStyle($message)) { $message = self::convertLambdaMessage($message); } @@ -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;