Skip to content
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

[10.x] Add CanNot rule in validation #47608

Closed

Conversation

milwad-dev
Copy link
Contributor

This PR is opposite that PR: #47371
May you need to validate that user has no ability to do, you can use Rule::cannot().

@Jubeki
Copy link
Contributor

Jubeki commented Jun 29, 2023

I am not in favour of this. Do you have an example where you want a field to be there if you don't have a permission?

Also the error message The :attribute field contains an unauthorized value is kind of misleading, because you would have a permission.

@milwad-dev milwad-dev closed this Jun 29, 2023
@milwad-dev milwad-dev deleted the add-cannot-rule-in-validation branch July 2, 2023 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants