<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE form-validation PUBLIC
          "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
          "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">

<!--
    Validation Rules for the Struts Example Web Application

    $Id: validation.xml,v 1.1.1.1 2006/01/16 07:16:20 huanxu Exp $
-->

<form-validation>


    <!-- ========== Default Language Form Definitions ===================== -->
    <formset>
 			<form name="userForm">
	       <field property="bean.id"
	              depends="required, minlength,maxlength">
	          <arg0   key="user.id"/>
	          <arg1   key="${var:minlength}" name="minlength"
	             resource="false"/>
	          <arg2   key="${var:maxlength}" name="maxlength"
	             resource="false"/>
	          <var>
	              <var-name>maxlength</var-name>
	              <var-value>20</var-value>
	          </var>
	          <var>
	              <var-name>minlength</var-name>
	              <var-value>3</var-value>
	          </var>
	       </field>
	       <field property="bean.question"
	              depends="required">
	          <arg0   key="user.question"/>
	       </field>
	       <field property="bean.answer"
	              depends="required">
	          <arg0   key="user.answer"/>
	       </field>
		      <field property="bean.password"
		              depends="required, minlength,maxlength">
		          <arg0   key="user.password"/>
		          <arg1   key="${var:minlength}" name="minlength"
		             resource="false"/>
		          <arg2   key="${var:maxlength}" name="maxlength"
		             resource="false"/>
		          <var>
		              <var-name>maxlength</var-name>
		              <var-value>20</var-value>
		          </var>
		          <var>
		              <var-name>minlength</var-name>
		              <var-value>3</var-value>
		          </var>
		      </field>
		      <field property="bean.email"
                    depends="required,email">
              <arg0   key="user.email"/>
          </field>
		 </form> 
		 <form name="userRegForm">
	       <field property="bean.id"
	              depends="required, minlength,maxlength">
	          <arg0   key="user.id"/>
	          <arg1   key="${var:minlength}" name="minlength"
	             resource="false"/>
	          <arg2   key="${var:maxlength}" name="maxlength"
	             resource="false"/>
	          <var>
	              <var-name>maxlength</var-name>
	              <var-value>20</var-value>
	          </var>
	          <var>
	              <var-name>minlength</var-name>
	              <var-value>3</var-value>
	          </var>
	       </field>
		     <field property="bean.password"
		              depends="required, minlength,maxlength">
		          <arg0   key="user.password"/>
		          <arg1   key="${var:minlength}" name="minlength"
		             resource="false"/>
		          <arg2   key="${var:maxlength}" name="maxlength"
		             resource="false"/>
		          <var>
		              <var-name>maxlength</var-name>
		              <var-value>20</var-value>
		          </var>
		          <var>
		              <var-name>minlength</var-name>
		              <var-value>3</var-value>
		          </var>
		      </field>
					<field property="repassword"
		              depends="required">
		          <arg0   key="user.repassword"/>
		      </field>		      
		      <field property="bean.question"
		              depends="required">
		          <arg0   key="user.question"/>
		      </field>
		      <field property="bean.answer"
		              depends="required">
		          <arg0   key="user.answer"/>
		      </field>	
		      <field property="bean.userName"
		              depends="required">
		          <arg0   key="user.userName"/>
		      </field>	
		      <field property="bean.sex"
		              depends="required">
		          <arg0   key="user.sex"/>
		      </field>
		      
		      <field property="bean.email"
                    depends="required,email">
              <arg0   key="user.email"/>
          </field>		      	      	      
		      <field property="bean.phone"
		              depends="required">
		          <arg0   key="user.phone"/>
		      </field>
		 </form> 
		 <form name="fguserForm">
	       <field property="bean.id"
	              depends="required, minlength,maxlength">
	          <arg0   key="user.id"/>
	          <arg1   key="${var:minlength}" name="minlength"
	             resource="false"/>
	          <arg2   key="${var:maxlength}" name="maxlength"
	             resource="false"/>
	          <var>
	              <var-name>maxlength</var-name>
	              <var-value>20</var-value>
	          </var>
	          <var>
	              <var-name>minlength</var-name>
	              <var-value>3</var-value>
	          </var>
	       </field>
		     <field property="bean.password"
		              depends="required, minlength,maxlength">
		          <arg0   key="user.password"/>
		          <arg1   key="${var:minlength}" name="minlength"
		             resource="false"/>
		          <arg2   key="${var:maxlength}" name="maxlength"
		             resource="false"/>
		          <var>
		              <var-name>maxlength</var-name>
		              <var-value>20</var-value>
		          </var>
		          <var>
		              <var-name>minlength</var-name>
		              <var-value>3</var-value>
		          </var>
		      </field>
					<field property="repassword"
		              depends="required">
		          <arg0   key="user.repassword"/>
		      </field>		      
		      <field property="bean.question"
		              depends="required">
		          <arg0   key="user.question"/>
		      </field>
		      <field property="bean.answer"
		              depends="required">
		          <arg0   key="user.answer"/>
		      </field>	
		      <field property="bean.userName"
		              depends="required">
		          <arg0   key="user.userName"/>
		      </field>	
		      <field property="bean.sex"
		              depends="required">
		          <arg0   key="user.sex"/>
		      </field>
		      
		      <field property="bean.email"
                    depends="required,email">
              <arg0   key="user.email"/>
          </field>		      	      	      
		      <field property="bean.phone"
		              depends="required">
		          <arg0   key="user.phone"/>
		      </field>
		 </form> 
		
		 <form name="orderForm">
	       <field property="bean.orderAddress.consignee"
	              depends="required">
	          <arg0   key="order.orderAddress.consignee"/>
	       </field>
	       <field property="bean.orderAddress.telephone"
	              depends="required">
	          <arg0   key="order.orderAddress.telephone"/>
	       </field>
	       <field property="bean.orderAddress.emailAddress"
	              depends="required,email">
	          <arg0   key="order.orderAddress.emailAddress"/>
	       </field>
	       <field property="bean.orderAddress.address"
	              depends="required">
	          <arg0   key="order.orderAddress.address"/>
	       </field>
	       <field property="bean.payType"
	              depends="required">
	          <arg0   key="order.payType"/>
	       </field>
	       <field property="bean.shipType"
	              depends="required">
	          <arg0   key="order.shipType"/>
	       </field>
	       <field property="bean.note"
              depends="minlength,maxlength">
          <arg0   key="order.note"/>
          <arg1   key="${var:minlength}" name="minlength"
             resource="false"/>
          <arg2   key="${var:maxlength}" name="maxlength"
             resource="false"/>
          <var>
              <var-name>maxlength</var-name>
              <var-value>255</var-value>
          </var>
          <var>
              <var-name>minlength</var-name>
              <var-value>5</var-value>
          </var>
       	</field>
		 </form>
		 <form name="fgorderForm">
	       <field property="bean.orderAddress.name"
	              depends="required">
	          <arg0   key="order.orderAddress.name"/>
	       </field>
	       <field property="bean.orderAddress.telephone"
	              depends="required">
	          <arg0   key="order.orderAddress.telephone"/>
	       </field>
	       <field property="bean.orderAddress.emailAddress"
	              depends="required,email">
	          <arg0   key="order.orderAddress.emailAddress"/>
	       </field>
	       <field property="bean.orderAddress.address"
	              depends="required">
	          <arg0   key="order.orderAddress.address"/>
	       </field>
	       <field property="bean.payType"
	              depends="required">
	          <arg0   key="order.payType"/>
	       </field>
	       <field property="bean.shipType"
	              depends="required">
	          <arg0   key="order.shipType"/>
	       </field>
	       <field property="bean.note"
              depends="required, maxlength">
          <arg0   key="order.note"/>
          <arg1   key="${var:maxlength}" name="maxlength"
             resource="false"/>
          <var>
              <var-name>maxlength</var-name>
              <var-value>122</var-value>
          </var>
       	</field>
		 </form>
		 
		 <form name="contentForm">
	       <field property="bean.name"
	              depends="required">
	          <arg0   key="content.name"/>
	       </field>
	       <field property="bean.categoryId"
	              depends="required">
	          <arg0   key="content.categoryId"/>
	       </field>
		 </form>
		 <form name="productForm">
	       <field property="bean.name"
	              depends="required">
	          <arg0   key="product.name"/>
	       </field>
	       <field property="bean.listPrice"
	              depends="required, float">
	          <arg0   key="product.listprice"/>
	       </field>
	       <field property="bean.unitPrice"
	              depends="required, float">
	          <arg0   key="product.unitPrice"/>
	       </field>
		 </form>
		  <form name="providerProductForm">
	       <field property="bean.name"
	              depends="required">
	          <arg0   key="product.name"/>
	       </field>
	       <field property="bean.listPrice"
	              depends="required, float">
	          <arg0   key="product.listprice"/>
	       </field>
	       <field property="bean.unitPrice"
	              depends="required, float">
	          <arg0   key="product.unitPrice"/>
	       </field>
		 </form>
</formset>
</form-validation>
