commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Syed Ghaznavi" <sghazn...@gmail.com>
Subject Commons Validator Issue with Collections
Date Sat, 05 Apr 2008 15:10:11 GMT
It's a question regarding commons validator api, wherein i am trying to
validate an input request form (xml-request) which contains a collection of
items...like

<OrdersInputRequest>
  <Order>
     <OrderId>222</OderId>
     <OrderTime>04/04/04</OrderTime>
  </Order>
   <Order>
     <OrderId>223</OderId>
     <OrderTime>04/04/04</OrderTime>
   </Order>
</OrderInputRequest>

What would be the valid format for the commons-validator form to validate
this input request? Since there can be any number of Orders
(java.util.ArrayList) in the request and all the items have the same
validation.
I looked at the examples on the project but couldn't find any solution...

*     <formset>
       <form name="OrdersRequestValidationForm">
          <field property="OrderId" type="Integer" depends="required">
</field>
          <field property="OrderTime" type="String" depends="required">
</field>
       </form>
    </formset> *

Any assistance on this is appreciated..

Thanks!

--Syed Ghaznavi

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message