Try this
<bean name="telephoneNumberValidator"
class="org.apache.tapestry.valid.PatternValidator">
<set-property name="patternString">"^[0-9 -]{6,}$"</set-property>
<set-message-property name="patternNotMatchedMessage"
key="telephone-number-pattern-not-matched"/>
<!--set-property name="patternNotMatchedMessage"
expression="getMessage('telephone-number-pattern-not-matched')"/-->
</bean>
Sean
Vjeran Marcinko wrote:
Well, people were mentioning some ValidationStrings.properties inside
Tapestry jar, but I haven't found exactly what's the way to override
these default messages.
-Vjeran
----- Original Message ----- From: "Chris Norris"
<[EMAIL PROTECTED]>
To: "Tapestry users" <[email protected]>
Sent: Tuesday, October 18, 2005 4:32 PM
Subject: Re: Specifying validating messages ?
Was there a way to do it globally in the old version? With the new ones,
and
I forgot this when I wrote the above email, you can specify things when
using the translator: tag like so:
translator="translator:number,omitZero=false"
You could probably do something like "translator:number,message=something"
althought I'm not entirely sure on how to get a whole string in there. But
that's not global, either. Your best bet may be to make a custom
translator.
---------------------------------------------------------------------
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]