Subject: | Can't validate complex array elements |
As far as I can tell, it's not possible to validate the elements in an
array of hashes, as in
foo => [ { a => 1 } , { a => 2 }, { a => 3 } ];
I imagined that this might work:
foo => { type => 'array', subtype => 'nested', child => { a => { type =>
'integer' } } };
But that returns:
'nested' is not valid here.
subtype => 'hash' doesn't work either, as it tries to turn the sub-hash
values (1, 2, 3 ) into hashrefs (it should probably check for that!) and
dies nastily:
Can't use string ("1") as a HASH ref while "strict refs" in use