-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Key with Route Params #46
Comments
Hi @miquellaboria . What are you trying to do here? Do you want validation for both or only one of them? |
Hi @DavidePastore I want to validate at least one of them. Thanks! |
@miquellaboria This is a nice use case. Can you please check if #40 fixes it and make it works as expected? |
@DavidePastore I have the same validation error: At least one of these rules must pass for null\nKey groupId must be present\nKey userId must be present Key are not found :( |
Hi, this #40 worked here. Here's my code:
|
@miquellaboria I expected that it worked as @alissonbezerra said. Let's investigate it. What is the definition of |
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
The text was updated successfully, but these errors were encountered: