Here's what I am trying to do:
I need to use a "default" validator.xml file to configure validations for 
fields on forms.
I also want to be able to specify another "custom" validator xml file, say
"validator-custom.xml" which contain
changes to the validations of some fields.
When I do this using "pathname" while configuring the validator plugin field
validations from the default validator.xml file 
are not inherited for the same form.

Here's a simple example,
Default validator.xml file contains:

<form-validation>
   <formset>
      <form name="emailForm">
         <field property="email"
                depends="required">
                <msg name="email" key="errors.invalid"/>
                <arg0 key="emailForm.label.email"/>
         </field>
         <field property="test"
                depends="required">
                <msg name="test" key="errors.required"/>
                <arg0 key="emailForm.label.test"/>
         </field>
      </form>
   </formset>
</form-validation>


validator-custom.xml contains:
<form-validation>
   <formset>
      <form name="emailForm">
         <field property="email"
                depends="required,email">
                <msg name="email" key="errors.invalid"/>
                <arg0 key="emailForm.label.email"/>
         </field>
      </form>
   </formset>
</form-validation>

Tha behavior I want is for the validator to use the validation for the
"test" field defined in the default validator.xml
and to use the validation for the "email" field from validator-custom.xml.
What is happening is that the validation for the "test" field is not used at
all, since both the forms are the same "emailForm".

I needed this behavior to be able to specify default field validations for
the base product and then allow the ability to customize them for a specific
scenario without copying and changing the validator.xml file itself.

Is there any way to accomplish this? Any help is much appreciated.

thanks
Anand Narayan

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

Reply via email to