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

Validation issue with arrays #748

Open
Nuranto opened this issue Sep 27, 2021 · 0 comments
Open

Validation issue with arrays #748

Nuranto opened this issue Sep 27, 2021 · 0 comments

Comments

@Nuranto
Copy link

Nuranto commented Sep 27, 2021

Subject of the issue

Rule does not work on array when using variable in rule.

Your environment

  • version of this package: Latest
  • version of Laravel: 8

Steps to reproduce

Example :

Rule :

'item.*.name' => 'required_unless:item.*.delete,1|string',

Expected behaviour

name shoud be required on rows where delete field is 0
name shoud be optionnal on rows where delete field is 1

Actual behaviour

name is always required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants