Add final API changes

This commit is contained in:
James Cole
2024-05-19 10:17:21 +02:00
parent 6d143f1624
commit c96226b9b4
7 changed files with 370 additions and 201 deletions

View File

@@ -32,6 +32,7 @@ class IsValidFilter implements ValidationRule
public function __construct(array $keys)
{
$this->allowed = $keys;
$this->allowed[] = 'user_group_id';
}
#[\Override]
@@ -45,7 +46,7 @@ class IsValidFilter implements ValidationRule
}
foreach ($value as $key => $val) {
if (!in_array($key, $this->allowed, true)) {
$fail('validation.bad_api_filter')->translate();
$fail('validation.bad_api_filter')->translate(['filter' => $key]);
}
}
}