Hi!

Does anyone know about the way to "inherit" (1) and "reuse" (2) validations for multiple forms in validation.xml
Explanation:
1.
I have a number of myForms: myForm1, myForm2, and so on they are of class MyForm (so they all have same fields) and I want them to validate the same.
e.g.
<form name="myForm1, myForm2">
<field
property="elementIndex"
depends="integer">
<arg0 key="Element index" resource="false"/>
</field>
</form>


2.
When I inherit MyExtForm from MyForm adding some fields and make form-beans myExtForms: myExtForm1, myExtForm2, and so on and would like them to "inherit" validation definitions from MyForm.


<form name="myExtForm1" extends="myForm1">
        //!!!validation for elementIndex field
        //already inherited!!!
        <field
           property="subElementIndex"
           depends="required">
           <arg0 key="Sub element index" resource="false"/>
        </field>
</form>

Yaroslav Novytskyy
P.S.
this would "compress" size of the validator.xml file
(in my case 10-20 times!)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to