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

Multiple rules for file upload always return false #2061

Closed
adnzaki opened this issue Jun 19, 2019 · 1 comment
Closed

Multiple rules for file upload always return false #2061

adnzaki opened this issue Jun 19, 2019 · 1 comment

Comments

@adnzaki
Copy link

adnzaki commented Jun 19, 2019

Hi, this is my first issue in this repo. I have searched all the issues that related to what I found, but I think it does not help. I have the following rules for file upload:

$fileRules = [
'agenda_attachment' => [              
      'uploaded[agenda_attachment]|mime_in[agenda_attachment,application/pdf]|max_size[agenda_attachment,1024]'
     ]
];

But when I run the code, it always returns false and gives error message of the first rule. After I tried with only one rule, it works as expected.

@adnzaki adnzaki closed this as completed Jun 19, 2019
@adnzaki
Copy link
Author

adnzaki commented Jun 19, 2019

It works now, that is my mistake because put the rules in new array.

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

No branches or pull requests

1 participant