Skip to content

Commit

Permalink
fix: add validation for filters.*.value presence
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzarbn committed Feb 4, 2021
1 parent edc0452 commit 43eb296
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Drivers/Standard/ParamsValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function validateFilters(Request $request): void
'filters.*.type' => ['sometimes', 'in:and,or'],
'filters.*.field' => ['required_with:filters', 'regex:/^[\w.]+$/', new WhitelistedField($this->filterableBy)],
'filters.*.operator' => ['required_with:filters', 'in:<,<=,>,>=,=,!=,like,not like,in,not in'],
'filters.*.value' => ['sometimes', 'nullable']
'filters.*.value' => ['present', 'nullable']
])->validate();
}

Expand Down

0 comments on commit 43eb296

Please sign in to comment.