diff --git a/src/Database/Database.php b/src/Database/Database.php index 25ddadba5..c3cb3c52a 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -5113,14 +5113,20 @@ public function deleteDocuments(string $collection, array $queries = [], int $ba $indexes = $collection->getAttribute('indexes', []); if ($this->validate) { - $validator = new DocumentsValidator($attributes, $indexes); + $validator = new DocumentsValidator( + $attributes, + $indexes, + $this->maxQueryValues, + $this->adapter->getMinDateTime(), + $this->adapter->getMaxDateTime() + ); + if (!$validator->isValid($queries)) { throw new QueryException($validator->getDescription()); } } $grouped = Query::groupByType($queries); - $filters = $grouped['filters']; $limit = $grouped['limit']; $cursor = $grouped['cursor'];