From 08d5bf1f66e0b9366feaefd8cd204c8e2cb67170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dezs=C5=91=20BICZ=C3=93?= Date: Tue, 28 Feb 2023 09:51:27 +0000 Subject: [PATCH] Fix missing validation errors --- src/DataAdaptor/DataAdaptorTransformerTrait.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/DataAdaptor/DataAdaptorTransformerTrait.php b/src/DataAdaptor/DataAdaptorTransformerTrait.php index d0f5c2f..cfc6b04 100644 --- a/src/DataAdaptor/DataAdaptorTransformerTrait.php +++ b/src/DataAdaptor/DataAdaptorTransformerTrait.php @@ -16,6 +16,8 @@ public function transform($data, Context $context = NULL) { if (!$this->conformsToExpectedInputShape($data, $context)) { /** @var \Shaper\Validator\ValidateableInterface $validator */ $validator = $this->getInputValidator(); + // Collect all validation errors (again). + $validator->isValid(); $message = sprintf( 'Adaptor %s received invalid input data: %s', __CLASS__,