Never mind.  This is what happens when you look at old documentation.  On
Dave's web site, in the doc for Validator, there is an example of defining a
constant like this - 

        <constant name="myConstant" value="myValue" />

This does not work!  The correct format (from Chuck's book) is

        <constant>
                <constant-name>myConstant</constant-name>
                <constant-value>myValue</constant-value>
        </constant>

which works like it should.

Just another one of those 'gotcha's ' that crops up every once in
awhile.....

Jerry

> -----Original Message-----
> From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, September 24, 2002 4:14 PM
> To: '[EMAIL PROTECTED]'
> Subject: [Validator] What the #@$!!@# am I doing wrong?
> 
> 
> Guys?  Anyone?  I'm really stuck here, and I hate to be a 
> bother, but can anyone tell me why this doesn't work?
> 
> <previous-post>
> 
> I've got the following in my application-rules.xml file:
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!--DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD
> Struts Validator Rules Configuration 1.1//EN"
> "http://jakarta.apache.org/struts/dtds/validator-rules_1_1.dtd"-->
> 
> <form-validation>
>       <global>
>               <constant name="dollarAmount" value="^[0-9,.]+" />
>       </global>
>       <formset>
>               <form name="/InsertAction">
>                       <field property="policyAmount"
> depends="required,mask">
>                               <msg name="mask"
> key="errors.invalid.character" />
>                               <arg0
> key="InsertForm.policyAmount.displayname" />
>                               <var>
>                                       <var-name>mask</var-name>
>       
> <var-value>${dollarAmount}</var-value>
>                               </var>
>                       </field>
>               </form>
>       </formset>
> </form-validation>
> 
> I've got 'errors.invalid.character' in my 
> ApplicationResources.properties.
> When I enter the value 100000 in the policyAmount field, 
> Validator tells me
> I've got invalid characters in the field.  Why?  Am I just 
> not getting the
> regular expression support in Validator?
> 
> </previous-post>
> 
> Jerry Jalenak
> Web Publishing
> LabOne, Inc.
> 10101 Renner Blvd.
> Lenexa, KS  66219
> (913) 577-1496
> [EMAIL PROTECTED]
> 
> 
> This transmission (and any information attached to it) may be 
> confidential and is intended solely for the use of the 
> individual or entity to which it is addressed. If you are not 
> the intended recipient or the person responsible for 
> delivering the transmission to the intended recipient, be 
> advised that you have received this transmission in error and 
> that any use, dissemination, forwarding, printing, or copying 
> of this information is strictly prohibited. If you have 
> received this transmission in error, please immediately 
> notify LabOne at (800)388-4675.
> 
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at (800)388-4675.



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

Reply via email to