Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How to retrieve array element from validated method
Is it possible to retrieve array element via $val->validated method like this:
$element = $val->validated("postarray.element");
I just realized I was retrieving all the input via $val->input so the filters where not applied and it seems I cannot just simply change in all my code $val->input to $val->validated because it does not support retrieving array element? Is that true?
At the moment validated() uses array_key_exists(), so no, you can not use dot-notation for array elements at the moment.
I've changed it to an Arr::get() call:
Can you verify this addresses your issue?
I can confirm, thank you.
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion