Adam Gordon <[EMAIL PROTECTED]> [060715 09:50]:
> What happens if you remove the "requireList" dependency and just use "mask?"

It is driving me crazy. I removed the requireList dependency and nothing
changed. I removed the complete validation for menuForm from validation.xml
and nothing changed. I changed validate="true" to false in struts-config.xml
and nothing changed. Also I deleted all the tomcat generated files in the
tomcat/work directly, but nothing changed. However, if I change for example
the struts-config.xml file in a way that it uses another jsp than at least
another jsp is shown.

There seems to go something completely wired going on and I have no idea
what it is. Is there another point where one can define validation rules for
a form?


Sebastian


> Sebastian Stein wrote:
> >Hi,
> >
> >I have a form, which should also use validation based on a mask. I already
> >enabled this kind of validation in another form and there it works. So I
> >guess I just have a type or did something wrong during copy&paste. Here is
> >the form definition in the struts-config.xml:
> >
> >      <form-bean name="menuForm"
> >                 type="org.contineo.forms.MenuForm">
> >         <form-property name="menuText"
> >                        type="java.lang.String"/>
> >      </form-bean>
> >
> >...
> >
> >      <action input="/AddMenu.do"
> >              name="menuForm"
> >              path="/SaveMenu"
> >              scope="request"
> >              type="org.contineo.actions.admin.menu.SaveMenuAction"
> >              validate="true">
> >         <forward name="addmenu"
> >                  path="/pages/addMenu.jsp"
> >                  redirect="false"/>
> >      </action>
> >
> >And here is the validation rule:
> >
> >      <form name="menuForm">
> >         <field property="menuText"
> >                depends="requireList,mask">
> >            <var>
> >               <var-name>count</var-name>
> >               <var-value>1</var-value>
> >            </var>
> >            <var>
> >               <var-name>field0</var-name>
> >               <var-value>menuGroup</var-value>
> >            </var>
> >            <var>
> >               <var-name>mask</var-name>
> >               <var-value>^[a-zA-Z]*$</var-value>
> >            </var>
> >            <msg name="menuForm.menuText"
> >                 key="errors.required"
> >                 resource="true"/>
> >            <msg name="mask"
> >                 key="errors.val.username"
> >                 resource="true"/>
> >         </field>
> >      </form>
> >
> >Interestingly the requireList validation rule works. So if the user does 
> >not
> >select something in field0, the validation fails. However, the mask rule is
> >not applied. It seems the content of menuText is not checked against the
> >pattern.
> >
> >Does anybody can spot the error? I'm using Struts 1.1.
> >
> >
> >Sebastian
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >  
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
http://www.hpfsc.de/ - die Seite rund um:
Assembler, Bundeswehr, TFT LCDs, Halle/Saale, Fahrradtouren, Neuseeland,
Wanderstaat Mauma, Raumschiff USS Nathan, Enemy Room, MLCAD Tutorial

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

Reply via email to