You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by starki78 <st...@libero.it> on 2005/11/25 14:56:48 UTC

Bug in Struts Validator?

Hi!

I've specified an validation xml that works
but I want to read the property-messages from
a properties file that I'would access from a bundle.
I use validator_1_1_3.dtd.
Isn't the bundle attribute recognized?
Is this a common bug?

 <!-- /jsp/example/validationExample.jsp -->
        <form name="validationExampleForm">
         
          <field property="qnummer"
                 depends="mask">
                 <arg position="0" bundle="TEST" key="validationExample.form.qnummer"/>
                 <arg position="1" bundle="TEST"  name="mask" key="${var:mask}" resource="false"/>
                  <var>
                    <var-name>mask</var-name>
                    <var-value>^[QXqx0-9]*$</var-value>
                  </var>
          </field>
         
        </form>

Thanks if someone can say anything about this!

Starky





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Bug in Struts Validator?

Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Theres no way to access the bundle attribute in Validator 1.1.3 and was the
main motivation for Validator 1.1.4:

    http://jakarta.apache.org/commons/validator/changes-report.html#1_1_4

Also struts didn't start to support these until Struts 1.2.7 - when the
dependency change to Validator 1.1.4

So the bottom line is you need to upgrade to Struts 1.2.7 (or later) and
Validator 1.1.4 (or later) if you want to use the bundle attribute.

Niall

----- Original Message ----- 
From: "starki78" <st...@libero.it>
Sent: Friday, November 25, 2005 1:56 PM


Hi!

I've specified an validation xml that works
but I want to read the property-messages from
a properties file that I'would access from a bundle.
I use validator_1_1_3.dtd.
Isn't the bundle attribute recognized?
Is this a common bug?

 <!-- /jsp/example/validationExample.jsp -->
        <form name="validationExampleForm">

          <field property="qnummer"
                 depends="mask">
                 <arg position="0" bundle="TEST"
key="validationExample.form.qnummer"/>
                 <arg position="1" bundle="TEST"  name="mask"
key="${var:mask}" resource="false"/>
                  <var>
                    <var-name>mask</var-name>
                    <var-value>^[QXqx0-9]*$</var-value>
                  </var>
          </field>

        </form>

Thanks if someone can say anything about this!

Starky





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org