validation icon indicating copy to clipboard operation
validation copied to clipboard

Checking object parameters

Open zyyip opened this issue 2 years ago • 1 comments

Hi, how would i check object params? There are only examples for arrays.

zyyip avatar Jul 27 '22 01:07 zyyip

The lib works only with arrays. Use reflections to convert your object into an array or implement a toArray() method that does that for you in your object. The library seems to be no longer maintained, otherwise I would have suggested to create a PR to add object support.

Check this fork, if its not already supporting objects I'm sure he will accept a proper PR. https://github.com/somnambulist-tech/validation

floriankraemer avatar Oct 04 '22 20:10 floriankraemer