Skip to content

Commit 915ec33

Browse files
committed
[Bugfix] Fix validating fields, sort and filter query params
The rule validators failed if any of these were non-array values. This has now been fixed, and the rule objects expect the `array` validation rule to be used before for these parameters. The docs show the array validation rule being used for these parameters.
1 parent 4c665af commit 915ec33

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ All notable changes to this project will be documented in this file. This projec
99

1010
- New `MultiPaginator` that allows a schema to offer multiple different pagination strategies.
1111

12+
### Fixed
13+
14+
- The JSON:API rule validators for the follow query parameter fields all errored if a non-array value was provided. This
15+
is now fixed:
16+
- `fields`
17+
- `page`
18+
- `filter`
19+
1220
## [2.5.2] - 2023-01-25
1321

1422
### Fixed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"laravel-json-api/encoder-neomerx": "^2.0.1",
3131
"laravel-json-api/exceptions": "^1.1.1",
3232
"laravel-json-api/spec": "^1.2",
33-
"laravel-json-api/validation": "^2.1.2",
33+
"laravel-json-api/validation": "^2.1.3",
3434
"laravel/framework": "^8.76|^9.0"
3535
},
3636
"require-dev": {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy