We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, How I should validate a serialized multiple value (multiple[]=1st, multiple[]=2nd) because if I use
$app->input()->post('multiple', TYPE_RAW);
return null.
Thanks.
The text was updated successfully, but these errors were encountered:
This is indeed not available yet, but you’re right in that we should definitely add it.
By the way, TYPE_RAW is probably not what you want. So you may want TYPE_STRING or something else instead.
TYPE_RAW
TYPE_STRING
Could you try something like the following?
// $key = 'multiple'; // $type = \TYPE_STRING; $data = !empty($_POST[$key]) && \is_array($_POST[$key]) ? $_POST[$key] : []; foreach ($data as $key => $value) { $data[$key] = $app->input()->value($value, $type); }
Does that work? If it does, we could certainly implement it as a convenient wrapper so that you would be able to call
$app->input()->postArray('multiple', TYPE_STRING);
in the future.
Sorry, something went wrong.
Thanks, it was just a segnalation but was not sure if I was missed something.
It's not so important there are different turnaround for fix but just because your framework is really well done should to be implemented.
Good this
Thanks again I don't know if you wanna this post as reminder by the way for me can be closed.
Thanks!
Let’s leave this open here until it’s implemented.
Please try the code above and see if it works for your use case when you find the time.
No branches or pull requests
Hi,
How I should validate a serialized multiple value (multiple[]=1st, multiple[]=2nd) because if I use
$app->input()->post('multiple', TYPE_RAW);
return null.
Thanks.
The text was updated successfully, but these errors were encountered: