How can I use Key with Route Params:
$app->delete('/group/{groupId}/access/{userId}', '\App\Controller\Group:removeUser')
->add(new \App\Lib\Validation(array(
v::oneOf(
v::key('groupId',v::IsPublicationOwner($container)),
v::key('userId', v::ItsMe($container))
)
)));
Returns:
At least one of these rules must pass for null
Key groupId must be present
Key userId must be present
How can I use Key with Route Params:
$app->delete('/group/{groupId}/access/{userId}', '\App\Controller\Group:removeUser')
->add(new \App\Lib\Validation(array(
v::oneOf(
v::key('groupId',v::IsPublicationOwner($container)),
v::key('userId', v::ItsMe($container))
)
)));
Returns:
At least one of these rules must pass for null
Key groupId must be present
Key userId must be present