Another, perhaps simpler, approach would be to create an array-aware decorator that decorates a validator object with the ability to validate arrays. That might be the easiest way to let a scalar-only validator automatically validate each element of a given array.

Regards,
Bryce Lohr


cvogt wrote:
I was a little to quick with my idea of wrapping $value into an array.
Apparently it is not that easy :). But still overwriting _validateRule and
_filterRule is the right way to solve it in a custom solution.

The permanently best thing however would be to write a patch that factors
out array handling into a Strategy and propose it to the Zend Framework
developers. Let's see if I find the time to do this.

Christopher

Reply via email to