You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Pacheco, Brent" <Br...@dor.mo.gov> on 2004/06/02 16:55:47 UTC
RequiredIf Validator Doesn't Seem To Work With Nested Properties
Howdy!
I'm just wondering if anyone has run across this issue and if so, is there a
workaround? It appears that the requiredif validator does not work
correctly when using nested properties. Here's my XML:
<field property="proofNumber"
depends="requiredif,mask" page="1">
<msg name="mask" key="placard.errors.physiciansNumber"/>
<arg0 key="placard.label.physiciansNumber"/>
<var>
<var-name>field[0]</var-name>
<var-value>ownerDEO.uniqueIdType</var-value>
</var>
<var>
<var-name>fieldTest[0]</var-name>
<var-value>EQUAL</var-value>
</var>
<var>
<var-name>fieldValue[0]</var-name>
<var-value>B</var-value>
</var>
<var>
<var-name>field[1]</var-name>
<var-value>proofType</var-value>
</var>
<var>
<var-name>fieldTest[1]</var-name>
<var-value>EQUAL</var-value>
</var>
<var>
<var-name>fieldValue[1]</var-name>
<var-value>P</var-value>
</var>
<var>
<var-name>fieldJoin</var-name>
<var-value>AND</var-value>
</var>
<var>
<var-name>mask</var-name>
<var-value>^\d{5}|\d{6}|\d{10}$</var-value>
</var>
</field>
When I had it coded such that the owner.uniqueId was not a nested property
(i.e. merely "uniqueId"), this validation worked perfectly. Now, however,
no matter what is entered, the system throws an error. Is there a different
syntax that I need to use or is this just a bug?
Thanks!
Brent
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org