diff --git a/src/Validator.php b/src/Validator.php index 757b3e3..bc09f5f 100644 --- a/src/Validator.php +++ b/src/Validator.php @@ -174,8 +174,7 @@ public static function json(string $field, array $data) : bool if ($data === null) { return false; } - \json_decode($data); - return \json_last_error() === \JSON_ERROR_NONE; + return \json_validate($data); } /**