Hi,

I've been attempting to implemented a 3D array as outline in the following HTML example:

<input type="text" name="enquiry[rooms][0][no_adults]" value="2" id="rooms_0_no_adults" /><br /> <input type="text" name="enquiry[rooms][0][no_children]" value="0" id="rooms_0_no_children" /><br />

Now firstly i checked to see if I could use the ISSET validator class as outlined here:

<validator class="isset" required="true">
  <argument>enquiry[rooms]</argument>
  <error>No rooms specifications defined.</error>
</validator>

From that validation I personally would of expected this result from the validator upon my request:

Enquiry => array(
  ...,  //other data
  Rooms => array(
     0 => array(  no_adults => 2, no_children => 0 )
  )
);

How ever, it appears that Agavi only returns:

Enquiry => array(
  ...,  //other data
  Rooms => array(
     0 => array()
  )
);

So, as you can see the no_adults and no_children have been omitted, so I thought maybe I should attempt to create my own validator to see if the data I want is returned from:

$this->getData($this->getArgument());

Which it does, now my i've told the Validator::validate() to return a result of true to say that my enquiry[rooms] array is valid, but Agavi still is omitting the 2 children attributes. So I'm a little stuck to how I can correctly validate this, I can't validate enquiry[rooms][0] as it may have more then one room and all following array locations wouldn't be tested.

So, my question is, is it possible to return the whole 3D array or is there a problem?

Cheers,

Jeramy Wenserit (E_mE)
e: [email protected]
w: www.xylesoft.co.uk

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to