Check Kohana3 by fields with []
I have a form containing checkboxes.
<input type="checkbox" name="question[5][13]" value="1" />
Now I want to use the Kohana validation class, but it seems that it does not validate fields that are an array ... has anyone ever worked on something?
I have something like this, but this will not work:
$rules->rule('question[5][13]', 'not_empty');
There is no need to do it if you have an array, than you should check its values, and not just one value, right?
So, if you have a “question” key in your values that need to be checked, you probably should call back with a custom check for it, right?
so..
$validation_object->callback('question', 'validate_question_method');
... , , , - .