best way to validate each item in array
Closed this issue · 2 comments
MarcusFulbright commented
Say I have a $subject like this:
$subject = [
'field' => 'value'
'array_field' => [
1,
2
]
];
What is the best way to create a $filter that will ensure that field
is a string and that array_field
only contains integers?
Currently I'm using a custom callback function. Is there a better way?
jakejohns commented
MarcusFulbright commented
ah cool. I think this can be closed then.