How to validate object input?

Hi,I found a solution for my previous question How to validate array inputs? - Questions / Components - Laminas Project Community
Thanks.

Now i am looking solution for associative way ?
Is there any example validating the object input fields using laminas validator. We use this method in our Rest API.

Example inputs;

photo[file_id]
photo[file_size]
photo[file_content]

It’s the same like in your collection example, use a separate input filter as input which creates a nested input filter. An example can be found in the documentation under the topic “Optional Input Filters”:

Use a default Laminas\InputFilter\InputFilter class if you do not needed optional inputs.


If something is missing in the documentation, it would be great if you could write a bug report. Thanks in advance! :+1:

1 Like

Thanks for the fast answer. I added a bug report for another issue. :beers:

But unfortunately in the wrong issue tracker. See my comment on the issue report:

Thanks!

Missing documents about building complex queries. · Issue #176 · laminas/laminas-db (github.com)