Ted Husted wrote:

> It looks right to me, David (and welcome back, BTW).

Me too, and thanks.

> Maybe we need to add a test case to the validator sample app to be 
> sure everything is still working as advertised.

That's probably a good idea. I think it needs some rigorous testing; 
I've run into other problems also.

> Are you using beta 2 or what? 

I'm using the nightly build from 8/19.


david

>
>
> -Ted.
>
> David Geary wrote:
>
>> Sorry to repost this, but it got buried in a bunch of biere messages 
>> yesterday...
>>
>> I'm trying to validate a range using the validator. I've got this in 
>> validation.xml...
>>
>> <form-validation>
>>   <formset>
>>       <form name='loginForm'>
>>           <field property='number' depends='range'>
>>               <arg0 key='login.number.displayName'/>
>>               <arg1 name='min' key='${var:min}' resource='false'/>
>>               <arg2 name='max' key='${var:max}' resource='false'/>
>>               <var>
>>                   <var-name>min</var-name>
>>                   <var-value>5</var-value>
>>               </var>
>>               <var>
>>                   <var-name>max</var-name>
>>                   <var-value>10</var-value>
>>               </var>
>>           </field>
>>       </form>
>>   </formset>
>> </form-validation>
>>
>> ...and this is how the field is defined in the form:
>>
>> <html:form action='login.do' focus='name'>
>>   <table>
>>       <tr>
>>           <td><fmt:message key='login.number.displayName'/><td>
>>           <td><html:text property='number'/></td>
>>       </tr>
>>   </table>
>> </html:form>
>>
>> The validation works: If I enter a value outside of the range, I get 
>> an error, and if not, I don't. But it's the error message that's the 
>> problem:
>>
>> Number is not in the range null through null.
>>
>> For some reason, even though the validator uses the correct min and 
>> max for validation, the error message doesn't reflect that. I've got 
>> the field display name and error message defined in my resource 
>> bundle, like this:
>>
>> login.number.displayName=Number
>> errors.range={0} is not in the range {1} through {2}.
>>
>> Does anyone know what's wrong?
>>
>> Thanks,
>>
>>
>> david
>>
>>
>
>
>
> -- 
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
>
>



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

Reply via email to