Skip to content

Use Key with Route Params #46

@miquellaboria

Description

@miquellaboria

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions