RE: Struts Validator changing the "key" in the validator.xml

2002-03-11 Thread Ben Kafka

Thanks Dave!

-Original Message-
From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 11, 2002 11:21 AM
To: Struts Users Mailing List
Subject: Re: Struts Validator changing the "key" in the validator.xml



There are some examples here.
http://home.earthlink.net/~dwinterfeldt/overview.html#i18n

> In the Application resources properties currently I
> have "{0} is invalid"
> for my "errors.invalid" tag. What I would like to
> have is "{0} is invalid
> because {1}" but I don't know how to define the {1}
> in the validation.xml
> and validation-rules.xml.


   

   
   
  mask
  ^[a-zA-Z]*$
   


or you can override the default message:


   
   

   
  mask
  ^[a-zA-Z]*$
   


David

--- Ben Kafka <[EMAIL PROTECTED]> wrote:
> Was wondering if there is a way to access a unique
> string to display for a
> "required" error in the javascript function under
> validator-rules.xml. Right
> now the following happens:
> If in the validator.xml file I specify the  key=regform.firstname.displayname" > it is
> used by both the "required" and "mask" javascript
> functions to display a
> canned error like
> Firstname is invalid.
> Firstname required.
>
> How can I differentiate these. For instance I would
> like to say..
> Firstname in invalid because only upper and lower
> case letters are allowed.
>
> In the Application resources properties currently I
> have "{0} is invalid"
> for my "errors.invalid" tag. What I would like to
> have is "{0} is invalid
> because {1}" but I don't know how to define the {1}
> in the validation.xml
> and validation-rules.xml.
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
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]>




Re: Struts Validator changing the "key" in the validator.xml

2002-03-11 Thread David Winterfeldt


There are some examples here.
http://home.earthlink.net/~dwinterfeldt/overview.html#i18n

> In the Application resources properties currently I
> have "{0} is invalid"
> for my "errors.invalid" tag. What I would like to
> have is "{0} is invalid
> because {1}" but I don't know how to define the {1}
> in the validation.xml
> and validation-rules.xml.

 
   


   
  mask
  ^[a-zA-Z]*$
   
 

or you can override the default message:

 

   

   
  mask
  ^[a-zA-Z]*$
   
 

David

--- Ben Kafka <[EMAIL PROTECTED]> wrote:
> Was wondering if there is a way to access a unique
> string to display for a
> "required" error in the javascript function under
> validator-rules.xml. Right
> now the following happens:
> If in the validator.xml file I specify the  key=regform.firstname.displayname" > it is
> used by both the "required" and "mask" javascript
> functions to display a
> canned error like
> Firstname is invalid.
> Firstname required.
> 
> How can I differentiate these. For instance I would
> like to say..
> Firstname in invalid because only upper and lower
> case letters are allowed.
> 
> In the Application resources properties currently I
> have "{0} is invalid"
> for my "errors.invalid" tag. What I would like to
> have is "{0} is invalid
> because {1}" but I don't know how to define the {1}
> in the validation.xml
> and validation-rules.xml.
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts Validator changing the "key" in the validator.xml

2002-03-11 Thread Ben Kafka

Was wondering if there is a way to access a unique string to display for a
"required" error in the javascript function under validator-rules.xml. Right
now the following happens:
If in the validator.xml file I specify the  it is
used by both the "required" and "mask" javascript functions to display a
canned error like
Firstname is invalid.
Firstname required.

How can I differentiate these. For instance I would like to say..
Firstname in invalid because only upper and lower case letters are allowed.

In the Application resources properties currently I have "{0} is invalid"
for my "errors.invalid" tag. What I would like to have is "{0} is invalid
because {1}" but I don't know how to define the {1} in the validation.xml
and validation-rules.xml.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: