how can I access form validations defined in validation.xml file using ModuleConfig or something else.....

2004-03-25 Thread Seyhan BASMACI \(Internet Yazilimlari Yetkilisi\)
.

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



Re: is it possible to define a validation that runs only server side or client side (validation.xml )

2004-03-25 Thread ruben
Seyhan BASMACI (Internet Yazilimlari Yetkilisi) wrote:

I have a LoginForm form extends ValidatorForm and I want to decide 
a validaton runs only on the server or client side, (or both )
is there any way to do this_? 


 
   
 
 

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

hi,
if you want to call th javascript validation you only have to call the 
function
validateLoginForm(form); if you don't call this function, client side 
validation is not called.
the case of server side validation is more complex, if you only want to 
call the client side validation and not the server side, you have to 
overwrite the method validate of the ActionForm, and do nothing on it, 
returning null.

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


is it possible to define a validation that runs only server side or client side (validation.xml )

2004-03-25 Thread Seyhan BASMACI \(Internet Yazilimlari Yetkilisi\)
I have a LoginForm form extends ValidatorForm and I want to decide 
a validaton runs only on the server or client side, (or both )
is there any way to do this_? 

 
  

  
  

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



Re: Can validation.xml be modularized?

2004-03-18 Thread Matt Bathje
- Original Message - 
From: "Chan, Jim" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 18, 2004 12:34 PM
Subject: Can validation.xml be modularized?


>
> I have modularized my Struts application using different struts-config.xml
> files. Also I am using different resource properties files for
localization
> for each module.  Everything works fine.  Currently, I am hooking up the
> client side validation using the struts validation plugin.  However, the
> only way I can get it working is to register all the form validation in
the
> validation.xml, and access the localized error messages using the default
> resource properties file.
>
> Does anyone know how to:
>
> 1.  modularize the validation.xml so that I can decompose it the same way
as
> I did for the struts-config files.  I tried using xml includes, but the
> validation plugin complains that it can't find my validation1.xml file.
It
> only works if I use the absolute file path.
>
>
> ]>
>
> &validation1;
>


For this part - I have wrestled with this alot, and have not been able to
get it to work for validation.xml or tiles-defs.xml. Search back through the
archives for something like "entity includes" and you will see my problems
with it, and some suggestions for fixing - none of which have worked for me.

I myself am convinced there is a bug in the plugin processor, or in
validation and tiles themselves that make this not possible. It works fine
in struts-config though. When I get free time (yeah right) I plan on getting
to the bottom of this, but I have know idea when it would be.


Matt Bathje


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



RE: Can validation.xml be modularized?

2004-03-18 Thread Paul, R. Chip
Isn't the validation.xml file defined in struts config?  So you could just
make separate files and include the appropriate one in each module's struts
config.

I haven't tried it but I imagine it would work.

-Original Message-
From: Chan, Jim [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 18, 2004 12:35 PM
To: '[EMAIL PROTECTED]'
Subject: Can validation.xml be modularized?



I have modularized my Struts application using different struts-config.xml
files. Also I am using different resource properties files for localization
for each module.  Everything works fine.  Currently, I am hooking up the
client side validation using the struts validation plugin.  However, the
only way I can get it working is to register all the form validation in the
validation.xml, and access the localized error messages using the default
resource properties file.

Does anyone know how to:

1.  modularize the validation.xml so that I can decompose it the same way as
I did for the struts-config files.  I tried using xml includes, but the
validation plugin complains that it can't find my validation1.xml file.  It
only works if I use the absolute file path.


]>

&validation1;

2.  when registering the forms in the validation.xml, access different
resources properties which I specify in the struts-config files 

Any help will be appreciated.

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



Can validation.xml be modularized?

2004-03-18 Thread Chan, Jim

I have modularized my Struts application using different struts-config.xml
files. Also I am using different resource properties files for localization
for each module.  Everything works fine.  Currently, I am hooking up the
client side validation using the struts validation plugin.  However, the
only way I can get it working is to register all the form validation in the
validation.xml, and access the localized error messages using the default
resource properties file.

Does anyone know how to:

1.  modularize the validation.xml so that I can decompose it the same way as
I did for the struts-config files.  I tried using xml includes, but the
validation plugin complains that it can't find my validation1.xml file.  It
only works if I use the absolute file path.


]>

&validation1;

2.  when registering the forms in the validation.xml, access different
resources properties which I specify in the struts-config files 

Any help will be appreciated.


Re: validation.xml & multiple select

2004-03-08 Thread Mark Shifman
http://javaboutique.internet.com/tutorials/Struts11Val/

shows how to make a custom validator for multiple selects that worked for me

mas
Siamack wrote:
Hello Everyone:

I have a multiple select option as follows:


France 
Germany
America 

in my struts-config.xml, I use a DynaValidatorForm as follows

 
  

.
.
. 
  
 

in my validation.xml I also have the following entry:

 
   
  
.
.
The validation does not work when I select nothing, though the other fields such as checkboxes, textfields, etc are okay? It seems when nothing is selected an empty array of string of size 0 is returned rather than a null value. Is there any way that I can check for the length of string array to be 0 (nothing selected) or is there any other way to make this work.

I would greatly appreciate your replies in advance.





-
Post your free ad now! Yahoo! Canada Personals
 



--
Mark Shifman MD. Ph.D.
Yale Center for Medical Informatics
Phone (203)737-5219
[EMAIL PROTECTED]


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


RE: validation.xml & multiple select

2004-03-08 Thread Julio Cesar De Salvo
Hi, use this in your validator-rules.xml.

   


  


Julio

-Mensaje original-
De: Siamack [mailto:[EMAIL PROTECTED] 
Enviado el: Lunes, 08 de Marzo de 2004 11:44 a.m.
Para: [EMAIL PROTECTED]
Asunto: validation.xml & multiple select

Hello Everyone:
 
I have a multiple select option as follows:
 

 France 
 Germany
 America 

 
in my struts-config.xml, I use a DynaValidatorForm as follows
 
 
   
 
 .
 .
 . 
   
 
 
in my validation.xml I also have the following entry:
 
  

   
 .
 .
 
The validation does not work when I select nothing, though the other
fields such as checkboxes, textfields, etc are okay? It seems when
nothing is selected an empty array of string of size 0 is returned
rather than a null value. Is there any way that I can check for the
length of string array to be 0 (nothing selected) or is there any other
way to make this work.
 
I would greatly appreciate your replies in advance.





-
Post your free ad now! Yahoo! Canada Personals


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



validation.xml & multiple select

2004-03-08 Thread Siamack
Hello Everyone:
 
I have a multiple select option as follows:
 

 France 
 Germany
 America 

 
in my struts-config.xml, I use a DynaValidatorForm as follows
 
 
   
 
 .
 .
 . 
   
 
 
in my validation.xml I also have the following entry:
 
  

   
 .
 .
 
The validation does not work when I select nothing, though the other fields such as 
checkboxes, textfields, etc are okay? It seems when nothing is selected an empty array 
of string of size 0 is returned rather than a null value. Is there any way that I can 
check for the length of string array to be 0 (nothing selected) or is there any other 
way to make this work.
 
I would greatly appreciate your replies in advance.





-
Post your free ad now! Yahoo! Canada Personals


subform definition in struts-config.xml and validation.xml

2004-03-08 Thread Dean A. Hoover
I have found cases in an application I am developing
where I can use tiles to define subforms that I can use
in several places. For example, I have a registration form
that collects contact information. Once registered, a user
can change their contact information. I defined a tiles
"subform" to collect the contact information, which is
really useful. But in defining the form-bean (struts-config.xml)
and formset/form (validation.xml) for the two different forms
I need to cut and paste the information in both files.
How can I define chunks of xml representing the subform
components for the two configuration files and include them
twice so that I don't have to cut and paste.
Dean Hoover

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


RE: validation.xml with German Characters (sauch as ü)

2004-03-01 Thread Zsolt Koppany
I tried that but it didn't help either.

it is strange because I can use the following expression does work:


filename
^[^\\/:*?"<>|]+$


Zsolt

> -Original Message-
> From: Theodosios Paschalidis [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 01, 2004 3:09 PM
> To: Struts Users Mailing List
> Subject: Re: validation.xml with German Characters (sauch as ü)
>
>
> Hi guys,
>
> I had similar issues with Greek. Certain regular expressions that were
> supposed to work with Unicode characters, actually didn't.
> A Struts fellow suggested changing the xml's encoding to UTF-8 as follows
> 
>
> I was then able to insert Greek characters directly, so it should
> work with
> German also.
>
> Hope that helps,
> Theo
>
> - Original Message -
> From: "Axel Gross" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, March 01, 2004 1:47 PM
> Subject: Re: validation.xml with German Characters (sauch as ü)
>
>
> > Moin zsolt!
> >
> > hi didn't do this before, so i'm not to sure about it.
> > looks like your current problem is a xml related one
> >
> > import the namespace of html, or define the entity by yourself
> > (should be something on selfhtml.teamone.de about it...)
> >
> > if it works with the validator, i don't know
> >
> > besides...
> > if anybody knows, if struts uses internationalisation on the
> validition.xml,
> > i'd be glad to know :)))
> >
> > lg,
> > Axel
> >
> > On 2004-03-01 at 14:29:52 +0100, Zsolt Koppany wrote:
> > > Hi,
> > >
> > > I want to use German Characters in validation.xml but when I use the
> > > expression below I get an error message attached to the end of this
> email:
> > >
> > > 
> > > username
> > >
> [EMAIL PROTECTED]ü]+$
> > > 
> > >
> > > Error message:
> > > Reference to undefined entity "ü".
> > > org.xml.sax.SAXParseException: Reference to undefined entity "ü".
> > >
> > > How can I use German Characters?
> > >
> > > Zsolt
> > >
> > >
> > >
> > >
> > > -
> > > 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]
> >
> >
>
> -
> 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]



Re: validation.xml with German Characters (sauch as ü)

2004-03-01 Thread Theodosios Paschalidis
Hi guys,

I had similar issues with Greek. Certain regular expressions that were
supposed to work with Unicode characters, actually didn't.
A Struts fellow suggested changing the xml's encoding to UTF-8 as follows


I was then able to insert Greek characters directly, so it should work with
German also.

Hope that helps,
Theo

- Original Message - 
From: "Axel Gross" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, March 01, 2004 1:47 PM
Subject: Re: validation.xml with German Characters (sauch as ü)


> Moin zsolt!
>
> hi didn't do this before, so i'm not to sure about it.
> looks like your current problem is a xml related one
>
> import the namespace of html, or define the entity by yourself
> (should be something on selfhtml.teamone.de about it...)
>
> if it works with the validator, i don't know
>
> besides...
> if anybody knows, if struts uses internationalisation on the
validition.xml,
> i'd be glad to know :)))
>
> lg,
> Axel
>
> On 2004-03-01 at 14:29:52 +0100, Zsolt Koppany wrote:
> > Hi,
> >
> > I want to use German Characters in validation.xml but when I use the
> > expression below I get an error message attached to the end of this
email:
> >
> > 
> > username
> >
[EMAIL PROTECTED]ü]+$
> > 
> >
> > Error message:
> > Reference to undefined entity "ü".
> > org.xml.sax.SAXParseException: Reference to undefined entity "ü".
> >
> > How can I use German Characters?
> >
> > Zsolt
> >
> >
> >
> >
> > -
> > 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]
>
>

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



Re: validation.xml with German Characters (sauch as ü)

2004-03-01 Thread Axel Gross
Moin zsolt!

hi didn't do this before, so i'm not to sure about it.
looks like your current problem is a xml related one

import the namespace of html, or define the entity by yourself
(should be something on selfhtml.teamone.de about it...)

if it works with the validator, i don't know

besides...
if anybody knows, if struts uses internationalisation on the validition.xml,
i'd be glad to know :)))

lg,
Axel

On 2004-03-01 at 14:29:52 +0100, Zsolt Koppany wrote:
> Hi,
> 
> I want to use German Characters in validation.xml but when I use the
> expression below I get an error message attached to the end of this email:
> 
> 
> username
> [EMAIL PROTECTED]ü]+$
> 
> 
> Error message:
> Reference to undefined entity "ü".
> org.xml.sax.SAXParseException: Reference to undefined entity "ü".
> 
> How can I use German Characters?
> 
> Zsolt
> 
> 
> 
> 
> -
> 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]



validation.xml with German Characters (sauch as ü)

2004-03-01 Thread Zsolt Koppany
Hi,

I want to use German Characters in validation.xml but when I use the
expression below I get an error message attached to the end of this email:


username
[EMAIL PROTECTED]ü]+$


Error message:
Reference to undefined entity "ü".
org.xml.sax.SAXParseException: Reference to undefined entity "ü".

How can I use German Characters?

Zsolt




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



Re: Hoe to use Actionpath in validation.xml???

2004-02-16 Thread subramaniam . o

Hi,
Thanks Nial , im using ValidatorActionForm,
let me try that one.

Subramaniam Olaganthan
Tata Consultancy Services
Plot No. 21
Industrial Estate,, Ambattur
Chennai,Tamil Nadu
India
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com





"Niall Pemberton"
<[EMAIL PROTECTED]> 
02/17/2004 05:33 AM




Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>





To
"Struts Users Mailing
List" <[EMAIL PROTECTED]>


cc



Subject
Re: Hoe to use Actionpath
in validation.xml???








Its all down to the flavour of ActionForm you use.
There a four "validation" flavours of ActionForm shipped with
Struts:

org.apache.struts.validator.ValidatorForm
org.apache.struts.validator.ValidatorActionForm
org.apache.struts.validator.DynaValidatorForm
org.apache.struts.validator.DynaValidatorActionForm

If your action forms are based on ValidatorForm or DynaValidatorForm then
they use the associated form name from struts-config.xml to look up the
validation rules in the validation configuration. If you use ValidatorActionForm
or DynaValidatorActionForm then they use the path from the struts-config.xml
to look up validations.

If you are not happy with either of these mechanisms, then all you have
to do is write your own ActionForm.validate() method which uses whatever
naming you want to access validator.

>From the struts-config.xml:




In your validation.xml file:


   ..


Niall
  - Original Message - 
  From: [EMAIL PROTECTED] 
  To: Struts Users Mailing List 
  Sent: Monday, February 16, 2004 7:57 PM
  Subject: Hoe to use Actionpath in validation.xml???



  Hi All, 
          how to use action paths in validation.xml.

  Sample code will be greatly appreciated. 

  Thanks in advance. 

  Thanks and Regards
  Subramaniam Olaganthan
  Tata Consultancy Services
  India
  Mailto: [EMAIL PROTECTED]
  Website: http://www.tcs.com


--


  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
ForwardSourceID:NT2EDE
   
DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery
of the message to such person) and may contain legally privileged and confidential 
information belonging to Tata Consultancy Services. It must not be printed, read, 
copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person 
other than the
addressee. Unauthorized use, disclosure or copying is strictly prohibited and may 
constitute unlawful act and can possibly attract legal action, civil and/or criminal. 
The contents of this message need not necessarily reflect or endorse the views of Tata 
Consultancy Services
on any subject matter. Any action taken or omitted to be taken based on this message 
is entirely at your risk and neither the originator of this message nor Tata 
Consultancy Services takes any responsibility or liability towards the same. Opinions, 
conclusions and any other
information contained in this message that do not relate to the official business of 
Tata Consultancy Services shall be understood as neither given nor endorsed by Tata 
Consultancy Services or any affiliate of Tata Consultancy Services. If you have 
received this message in error,
you should destroy this message and may please notify the sender by e-mail. Thank you.


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

Re: Hoe to use Actionpath in validation.xml???

2004-02-16 Thread Niall Pemberton
Its all down to the flavour of ActionForm you use. There a four "validation" flavours 
of ActionForm shipped with Struts:

org.apache.struts.validator.ValidatorForm
org.apache.struts.validator.ValidatorActionForm
org.apache.struts.validator.DynaValidatorForm
org.apache.struts.validator.DynaValidatorActionForm

If your action forms are based on ValidatorForm or DynaValidatorForm then they use the 
associated form name from struts-config.xml to look up the validation rules in the 
validation configuration. If you use ValidatorActionForm or DynaValidatorActionForm 
then they use the path from the struts-config.xml to look up validations.

If you are not happy with either of these mechanisms, then all you have to do is write 
your own ActionForm.validate() method which uses whatever naming you want to access 
validator.

>From the struts-config.xml:



In your validation.xml file:


   ..


Niall
  - Original Message - 
  From: [EMAIL PROTECTED] 
  To: Struts Users Mailing List 
  Sent: Monday, February 16, 2004 7:57 PM
  Subject: Hoe to use Actionpath in validation.xml???



  Hi All, 
  how to use action paths in validation.xml. 
  Sample code will be greatly appreciated. 

  Thanks in advance. 

  Thanks and Regards
  Subramaniam Olaganthan
  Tata Consultancy Services
  India
  Mailto: [EMAIL PROTECTED]
  Website: http://www.tcs.com


--


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

Hoe to use Actionpath in validation.xml???

2004-02-16 Thread subramaniam . o

Hi All,
        how
to use action paths in validation.xml.
Sample code will be greatly appreciated.

Thanks in advance.

Thanks and Regards
Subramaniam Olaganthan
Tata Consultancy Services
India
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.comDISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery
of the message to such person) and may contain legally privileged and confidential 
information belonging to Tata Consultancy Services. It must not be printed, read, 
copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person 
other than the
addressee. Unauthorized use, disclosure or copying is strictly prohibited and may 
constitute unlawful act and can possibly attract legal action, civil and/or criminal. 
The contents of this message need not necessarily reflect or endorse the views of Tata 
Consultancy Services
on any subject matter. Any action taken or omitted to be taken based on this message 
is entirely at your risk and neither the originator of this message nor Tata 
Consultancy Services takes any responsibility or liability towards the same. Opinions, 
conclusions and any other
information contained in this message that do not relate to the official business of 
Tata Consultancy Services shall be understood as neither given nor endorsed by Tata 
Consultancy Services or any affiliate of Tata Consultancy Services. If you have 
received this message in error,
you should destroy this message and may please notify the sender by e-mail. Thank you.


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

Re: validation.xml and java.sql.Date

2004-02-12 Thread Mark Lowe


Personally I just use separate field for day / month / year and convert 
to a date in my model. Drop down menus make inputing dates simpler.



On 12 Feb 2004, at 14:56, Carl Walker wrote:

Thanks for your reply.  The problem I'm having is that the field is 
not required, so specifying a string like '1970-01-01' for an initial 
value isn't desirable.

- Original Message -
From: Mark Lowe <[EMAIL PROTECTED]>
Date: Thursday, February 12, 2004 8:44 am
Subject: Re: validation.xml and java.sql.Date
You can have a string that looks like a date and validator will
still
validate it. To my knowledge there is no need to have the property
of
type Date. same is true of other types also.
On 12 Feb 2004, at 14:36, Carl Walker wrote:

Hi,

I'm having a problem setting an initial value for a
DynaValidatorForm.
 I have a date field that is not required to be filled in.
However,
when I submit the form without a value, I get a Date.valueOf
exception
thrown from SQLConverter.

If I submit a valid value or attempt to submit a bogus (non-
NULL)
value, everything works.

This is from my struts-config.xml file.

     

Here is the validation.xml entry.

  


  datePatternStrict
  -MM-dd

  


-

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]



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


Re: validation.xml and java.sql.Date

2004-02-12 Thread Carl Walker
Thanks for your reply.  The problem I'm having is that the field is not required, so 
specifying a string like '1970-01-01' for an initial value isn't desirable.

- Original Message -
From: Mark Lowe <[EMAIL PROTECTED]>
Date: Thursday, February 12, 2004 8:44 am
Subject: Re: validation.xml and java.sql.Date

> You can have a string that looks like a date and validator will 
> still 
> validate it. To my knowledge there is no need to have the property 
> of 
> type Date. same is true of other types also.
> 
> 
> On 12 Feb 2004, at 14:36, Carl Walker wrote:
> 
> > Hi,
> >
> > I'm having a problem setting an initial value for a 
> DynaValidatorForm. 
> >  I have a date field that is not required to be filled in.  
> However, 
> > when I submit the form without a value, I get a Date.valueOf 
> exception 
> > thrown from SQLConverter.
> >
> > If I submit a valid value or attempt to submit a bogus (non-
> NULL) 
> > value, everything works.
> >
> > This is from my struts-config.xml file.
> >
> >  
> >
> > Here is the validation.xml entry.
> >
> >   
> > 
> > 
> >   datePatternStrict
> >   -MM-dd
> > 
> >   
> >
> >
> >
> > -
> 
> > 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]
> 
> 


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



Re: validation.xml and java.sql.Date

2004-02-12 Thread Mark Lowe
You can have a string that looks like a date and validator will still 
validate it. To my knowledge there is no need to have the property of 
type Date. same is true of other types also.

On 12 Feb 2004, at 14:36, Carl Walker wrote:

Hi,

I'm having a problem setting an initial value for a DynaValidatorForm. 
 I have a date field that is not required to be filled in.  However, 
when I submit the form without a value, I get a Date.valueOf exception 
thrown from SQLConverter.

If I submit a valid value or attempt to submit a bogus (non-NULL) 
value, everything works.

This is from my struts-config.xml file.

 

Here is the validation.xml entry.

  


  datePatternStrict
  -MM-dd

  


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


validation.xml and java.sql.Date

2004-02-12 Thread Carl Walker
Hi,

I'm having a problem setting an initial value for a DynaValidatorForm.  I have a date 
field that is not required to be filled in.  However, when I submit the form without a 
value, I get a Date.valueOf exception thrown from SQLConverter.

If I submit a valid value or attempt to submit a bogus (non-NULL) value, everything 
works.

This is from my struts-config.xml file.

 

Here is the validation.xml entry.

  


  datePatternStrict
  -MM-dd

  



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



Re: Validation.xml

2004-02-11 Thread Joe Germuska
At 10:29 AM +0530 2/11/04, [EMAIL PROTECTED] wrote:
Hi,
O.k I'll try VaidatorActionForm. could you plz tell me whether the 
following line is correct!

Validation.xml



no, form properties are "field" elements within the "form" element.

Have a look at http://jakarta.apache.org/struts/userGuide/dev_validator.html

There are also several links at the bottom to more detailed 
information, including sample chapters from two Struts books.

Joe

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
  "Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining."
-- Jef Raskin

RE: Validation.xml

2004-02-11 Thread Marco Mistroni
Hi,
Easiest thing is to handle this in the validate method of
your action form, provided that
You have a parameter in your Action form that can tells you if you are
adding modifying or viewing..
 
Regards
marco
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 11 February 2004 03:22
To: [EMAIL PROTECTED]
Subject: Validation.xml
 

Hi Guys, 

I've three screens assume that they are add, modify and view
screens. I would like to use same form for all the screens. 
But the problem is, each one of the screens has a different set of
validation rules, how do i achieve this? Somewhere, i read that it 
is possible to use action path names in validation.xml. Can anyone post
a sample validation.xml? 



Thanks and Regards

O. Subramaniam 
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com


Re: Validation.xml

2004-02-10 Thread subramaniam . o

Hi,
O.k I'll try VaidatorActionForm. could
you plz tell me whether the following line is correct!

Validation.xml

        


Thanks and Regards

O. Subramaniam 
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com





Joe Germuska <[EMAIL PROTECTED]>

02/11/2004 10:17 AM




Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>





To
"Struts Users Mailing
List" <[EMAIL PROTECTED]>


cc



Subject
Re: Validation.xml








At 9:52 AM +0530 2/11/04, [EMAIL PROTECTED] wrote:
>Hi,
>
>All my forms extend ValidatorForm,  should i change it to DynaValidatorForm?
>is this is the only option?

Whoops.  No; just extend ValidatorActionForm instead; it's the same
model.

http://jakarta.apache.org/struts/api/org/apache/struts/validator/ValidatorActionForm.html

I haven't had to actually write a form class in quite a while, so I 
assumed that you were using DynaForms too.

Joe

-- 
Joe Germuska            
[EMAIL PROTECTED]  
http://blog.germuska.com    
       "Imagine if every Thursday your shoes exploded
if you tied them 
the usual way.  This happens to us all the time with computers, and

nobody thinks of complaining."
             -- Jef Raskin
ForwardSourceID:NT2526
   
DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery
of the message to such person) and may contain legally privileged and confidential 
information belonging to Tata Consultancy Services. It must not be printed, read, 
copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person 
other than the
addressee. Unauthorized use, disclosure or copying is strictly prohibited and may 
constitute unlawful act and can possibly attract legal action, civil and/or criminal. 
The contents of this message need not necessarily reflect or endorse the views of Tata 
Consultancy Services
on any subject matter. Any action taken or omitted to be taken based on this message 
is entirely at your risk and neither the originator of this message nor Tata 
Consultancy Services takes any responsibility or liability towards the same. Opinions, 
conclusions and any other
information contained in this message that do not relate to the official business of 
Tata Consultancy Services shall be understood as neither given nor endorsed by Tata 
Consultancy Services or any affiliate of Tata Consultancy Services. If you have 
received this message in error,
you should destroy this message and may please notify the sender by e-mail. Thank you.


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

Re: Validation.xml

2004-02-10 Thread Joe Germuska
At 9:52 AM +0530 2/11/04, [EMAIL PROTECTED] wrote:
Hi,

All my forms extend ValidatorForm,  should i change it to DynaValidatorForm?
is this is the only option?
Whoops.  No; just extend ValidatorActionForm instead; it's the same model.

http://jakarta.apache.org/struts/api/org/apache/struts/validator/ValidatorActionForm.html

I haven't had to actually write a form class in quite a while, so I 
assumed that you were using DynaForms too.

Joe

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
  "Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining."
-- Jef Raskin

Re: Validation.xml

2004-02-10 Thread subramaniam . o

Hi,

All my forms extend ValidatorForm,  should
i change it to DynaValidatorForm?
is this is the only option?


Thanks and Regards

O. Subramaniam 
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com





Joe Germuska <[EMAIL PROTECTED]>

02/11/2004 09:37 AM




Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>





To
"Struts Users Mailing
List" <[EMAIL PROTECTED]>


cc



Subject
Re: Validation.xml








At 8:51 AM +0530 2/11/04, [EMAIL PROTECTED] wrote:
>Hi Guys,
>
>         I've three screens assume that they are
add, modify and view 
>screens. I would like to use same form for all the screens.
>But the problem is, each one of the screens has a different set of

>validation rules, how do i achieve this? Somewhere, i read that it
>is possible to use action path names in validation.xml. Can anyone

>post a sample validation.xml?

Basically, you just use a different form class in the struts-config:
http://jakarta.apache.org/struts/api/org/apache/struts/validator/DynaValidatorActionForm.html

When this class's validate method is called, it uses that action's 
path instead of form's name.

Joe

-- 
Joe Germuska            
[EMAIL PROTECTED]  
http://blog.germuska.com    
       "Imagine if every Thursday your shoes exploded
if you tied them 
the usual way.  This happens to us all the time with computers, and

nobody thinks of complaining."
             -- Jef Raskin
ForwardSourceID:NT251A
   
DISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery
of the message to such person) and may contain legally privileged and confidential 
information belonging to Tata Consultancy Services. It must not be printed, read, 
copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person 
other than the
addressee. Unauthorized use, disclosure or copying is strictly prohibited and may 
constitute unlawful act and can possibly attract legal action, civil and/or criminal. 
The contents of this message need not necessarily reflect or endorse the views of Tata 
Consultancy Services
on any subject matter. Any action taken or omitted to be taken based on this message 
is entirely at your risk and neither the originator of this message nor Tata 
Consultancy Services takes any responsibility or liability towards the same. Opinions, 
conclusions and any other
information contained in this message that do not relate to the official business of 
Tata Consultancy Services shall be understood as neither given nor endorsed by Tata 
Consultancy Services or any affiliate of Tata Consultancy Services. If you have 
received this message in error,
you should destroy this message and may please notify the sender by e-mail. Thank you.


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

Re: Validation.xml

2004-02-10 Thread Joe Germuska
At 8:51 AM +0530 2/11/04, [EMAIL PROTECTED] wrote:
Hi Guys,

I've three screens assume that they are add, modify and view 
screens. I would like to use same form for all the screens.
But the problem is, each one of the screens has a different set of 
validation rules, how do i achieve this? Somewhere, i read that it
is possible to use action path names in validation.xml. Can anyone 
post a sample validation.xml?
Basically, you just use a different form class in the struts-config:
http://jakarta.apache.org/struts/api/org/apache/struts/validator/DynaValidatorActionForm.html
When this class's validate method is called, it uses that action's 
path instead of form's name.

Joe

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
  "Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining."
-- Jef Raskin

Validation.xml

2004-02-10 Thread subramaniam . o

Hi Guys,

        I've
three screens assume that they are add, modify and view screens. I would
like to use same form for all the screens.
But the problem is, each one of the
screens has a different set of validation rules, how do i achieve this?
Somewhere, i read that it
is possible to use action path names
in validation.xml. Can anyone post a sample validation.xml?



Thanks and Regards

O. Subramaniam 
Tata Consultancy Services
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.comDISCLAIMER: The information contained in this message is intended only and solely for 
the addressed individual or entity indicated in this message and for the exclusive use 
of the said addressed individual or entity indicated in this message (or responsible 
for delivery
of the message to such person) and may contain legally privileged and confidential 
information belonging to Tata Consultancy Services. It must not be printed, read, 
copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person 
other than the
addressee. Unauthorized use, disclosure or copying is strictly prohibited and may 
constitute unlawful act and can possibly attract legal action, civil and/or criminal. 
The contents of this message need not necessarily reflect or endorse the views of Tata 
Consultancy Services
on any subject matter. Any action taken or omitted to be taken based on this message 
is entirely at your risk and neither the originator of this message nor Tata 
Consultancy Services takes any responsibility or liability towards the same. Opinions, 
conclusions and any other
information contained in this message that do not relate to the official business of 
Tata Consultancy Services shall be understood as neither given nor endorsed by Tata 
Consultancy Services or any affiliate of Tata Consultancy Services. If you have 
received this message in error,
you should destroy this message and may please notify the sender by e-mail. Thank you.


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

RE: Conditional check for depends clause in Validation.xml

2003-12-11 Thread Clark Kent
 
I am currently using Struts 1.1 which means I am gonna have to stick with requiredif 
instead of validwhen.  I tried using the requiredif but to no success. I dont know if 
its the validator that I have below that is causing the problem. This is the validator 
I got off the internet.  Is there a way someone can provide me with the complete 
validation check for requiredif validator.
 





 

Also when I use the mask, it displays a syntax error.  Without the depends="mask", it 
works but without performing the requiredif check.









field[0]

userID





field-test[0]

allen















field[0]

acctID





field-test[0]

allen

 



Can someone kindly point out if I am missing something?  Can I use mask along with 
requiredif?
Thanks,
CK.


Andy Schmidgall <[EMAIL PROTECTED]> wrote:
http://jakarta.apache.org/struts/userGuide/dev_validator.html

:)

-Andy

-Original Message-
From: Clark Kent [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 11, 2003 3:02 PM
To: Struts Users Mailing List
Subject: RE: Conditional check for depends clause in Validation.xml


How do I use requiredif or validatewhen? Do you have any examples that
I can use Udaya. Thanks, CK

Udaya Allu wrote:
use requiredif or validatewhen in the place of required

-Original Message-
From: Clark Kent [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 3:59 PM
To: usergroup
Subject: Conditional check for depends clause in Validation.xml



I have a scenario where I have 2 textboxes in a form and I need to have
the user enter either one of the fields but not both. 







Is there a way that we can provide conditional checks within the depends
clause?

Thanks,

CK.







-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

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


-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

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


-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

RE: Conditional check for depends clause in Validation.xml

2003-12-11 Thread Clark Kent
Many Thanks Andy!

Andy Schmidgall <[EMAIL PROTECTED]> 
wrote:http://jakarta.apache.org/struts/userGuide/dev_validator.html

:)

-Andy

-Original Message-
From: Clark Kent [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 11, 2003 3:02 PM
To: Struts Users Mailing List
Subject: RE: Conditional check for depends clause in Validation.xml


How do I use requiredif or validatewhen? Do you have any examples that
I can use Udaya. Thanks, CK

Udaya Allu wrote:
use requiredif or validatewhen in the place of required

-Original Message-
From: Clark Kent [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 3:59 PM
To: usergroup
Subject: Conditional check for depends clause in Validation.xml



I have a scenario where I have 2 textboxes in a form and I need to have
the user enter either one of the fields but not both. 







Is there a way that we can provide conditional checks within the depends
clause?

Thanks,

CK.







-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

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


-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

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



-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

RE: Conditional check for depends clause in Validation.xml

2003-12-11 Thread Andy Schmidgall
http://jakarta.apache.org/struts/userGuide/dev_validator.html

:)

-Andy

-Original Message-
From: Clark Kent [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 11, 2003 3:02 PM
To: Struts Users Mailing List
Subject: RE: Conditional check for depends clause in Validation.xml


How do I use requiredif or validatewhen?  Do you have any examples that
I can use Udaya. Thanks, CK

Udaya Allu <[EMAIL PROTECTED]> wrote:
use requiredif or validatewhen in the place of required

-Original Message-
From: Clark Kent [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 3:59 PM
To: usergroup
Subject: Conditional check for depends clause in Validation.xml



I have a scenario where I have 2 textboxes in a form and I need to have
the user enter either one of the fields but not both. 







Is there a way that we can provide conditional checks within the depends
clause?

Thanks,

CK.







-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

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


-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

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



RE: Conditional check for depends clause in Validation.xml

2003-12-11 Thread Clark Kent
How do I use requiredif or validatewhen?  Do you have any examples that I can use 
Udaya.
Thanks,
CK

Udaya Allu <[EMAIL PROTECTED]> wrote:
use requiredif or validatewhen in the place of required

-Original Message-
From: Clark Kent [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 3:59 PM
To: usergroup
Subject: Conditional check for depends clause in Validation.xml



I have a scenario where I have 2 textboxes in a form and I need to have the user enter 
either one of the fields but not both. 







Is there a way that we can provide conditional checks within the depends clause?

Thanks,

CK.







-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

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


-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

RE: Conditional check for depends clause in Validation.xml

2003-12-11 Thread Udaya Allu
use requiredif or validatewhen in the place of required

-Original Message-
From: Clark Kent [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 11, 2003 3:59 PM
To: usergroup
Subject: Conditional check for depends clause in Validation.xml



I have a scenario where I have 2 textboxes in a form and I need to have the user enter 
either one of the fields but not both.  





   

Is there a way that we can provide conditional checks within the depends clause?

Thanks,

CK.

 

 



-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

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



Conditional check for depends clause in Validation.xml

2003-12-11 Thread Clark Kent

I have a scenario where I have 2 textboxes in a form and I need to have the user enter 
either one of the fields but not both.  





   

Is there a way that we can provide conditional checks within the depends clause?

Thanks,

CK.

 

 



-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing

question on using a different resource bundle in validation.xml

2003-12-11 Thread Nandita Rajagopalan
Is there a way that I can use keys from a different resource bundle other than 
ApplicationResources.properties in the validation.xml. Or is the default bundle the 
only place I can use to place keys for my messages.



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



Re: Range validation by validation.xml

2003-11-28 Thread Ricky
thx for replying me, but the maximum is from the database...and i don't know
the maximum would bei only want to validate the data wheather > 0, if
the value = 0 ,it will shows errors, so i use range to validate the value, i
can offer the minimum value is 1, and i can't provide the maximum... except
for range depends , any other depends for me to validate this case?


- Original Message -
From: "Robert Lamping" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Saturday, November 29, 2003 3:01 AM
Subject: RE: Range validation by validation.xml


Dear Ricky,

Why won't you validate the maximum value?
If you don't, then you risk a database exception, if the value entered is
too high.
Is that the result you want?

Robert

-Original Message-
From: Ricky [mailto:[EMAIL PROTECTED]
Sent: Friday, November 28, 2003 5:54 PM
To: Struts Users Mailing List
Subject: Re: Range validation by validation.xml



hi, if the value must be greater than 0. do you have any other better way?
now i am using range , if i don't set the max value, it can't work
,otherwise , set a limited value, i don't know the value that inputed.  i
can use "validwhen", but it's not available in Struts 1.1 now :(


- Original Message -
From: "Robert Lamping" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 26, 2003 10:11 PM
Subject: RE: Range validation by validation.xml


Dear Honza,

I would suggest you also supply the maximum value.


max
99


The presentation in which you are working already knows something from the
data layer, i.e. the value must be greater than 0.
In order to prevent errors due to storing a value higher than the allowed
value, I would suggest you also enter the maximum value.
When you change the maximum allowed value in the table then indeed you have
to change the validation.xml.
When you rewrite your tests this need for adaptation will pop up.

Kind regards,

Robert


-Original Message-
From: Honza Spurný [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 9:25 AM
To: [EMAIL PROTECTED]
Subject: Range validation by validation.xml


Hi there,

I know, that is possible to validate throught validation.xml file if input
is integer in the specified range... But I would like to check, if the input
number is unsigned int. (It means in the range where minimum is equal to 1
and maximum is not specified -- 1,2,3,4,... ) I would like to range the
input only from the minimum value, but not from the maximum value.

Is any esay way how to do it? I've tried to specified this in
validation.xml, but it doesn't work as I want:



min
1






Thanks for helping.

Sporak


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



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



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



RE: Range validation by validation.xml

2003-11-28 Thread Robert Lamping
Dear Ricky,

Why won't you validate the maximum value?
If you don't, then you risk a database exception, if the value entered is
too high. 
Is that the result you want?

Robert

-Original Message-
From: Ricky [mailto:[EMAIL PROTECTED]
Sent: Friday, November 28, 2003 5:54 PM
To: Struts Users Mailing List
Subject: Re: Range validation by validation.xml



hi, if the value must be greater than 0. do you have any other better way?
now i am using range , if i don't set the max value, it can't work
,otherwise , set a limited value, i don't know the value that inputed.  i
can use "validwhen", but it's not available in Struts 1.1 now :(


- Original Message -
From: "Robert Lamping" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 26, 2003 10:11 PM
Subject: RE: Range validation by validation.xml


Dear Honza,

I would suggest you also supply the maximum value.


max
99


The presentation in which you are working already knows something from the
data layer, i.e. the value must be greater than 0.
In order to prevent errors due to storing a value higher than the allowed
value, I would suggest you also enter the maximum value.
When you change the maximum allowed value in the table then indeed you have
to change the validation.xml.
When you rewrite your tests this need for adaptation will pop up.

Kind regards,

Robert


-Original Message-
From: Honza Spurný [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 9:25 AM
To: [EMAIL PROTECTED]
Subject: Range validation by validation.xml


Hi there,

I know, that is possible to validate throught validation.xml file if input
is integer in the specified range... But I would like to check, if the input
number is unsigned int. (It means in the range where minimum is equal to 1
and maximum is not specified -- 1,2,3,4,... ) I would like to range the
input only from the minimum value, but not from the maximum value.

Is any esay way how to do it? I've tried to specified this in
validation.xml, but it doesn't work as I want:



min
1






Thanks for helping.

Sporak


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



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



Re: Range validation by validation.xml

2003-11-28 Thread Ricky

hi, if the value must be greater than 0. do you have any other better way?
now i am using range , if i don't set the max value, it can't work
,otherwise , set a limited value, i don't know the value that inputed.  i
can use "validwhen", but it's not available in Struts 1.1 now :(


- Original Message -
From: "Robert Lamping" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, November 26, 2003 10:11 PM
Subject: RE: Range validation by validation.xml


Dear Honza,

I would suggest you also supply the maximum value.


max
99


The presentation in which you are working already knows something from the
data layer, i.e. the value must be greater than 0.
In order to prevent errors due to storing a value higher than the allowed
value, I would suggest you also enter the maximum value.
When you change the maximum allowed value in the table then indeed you have
to change the validation.xml.
When you rewrite your tests this need for adaptation will pop up.

Kind regards,

Robert


-Original Message-
From: Honza Spurný [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 9:25 AM
To: [EMAIL PROTECTED]
Subject: Range validation by validation.xml


Hi there,

I know, that is possible to validate throught validation.xml file if input
is integer in the specified range... But I would like to check, if the input
number is unsigned int. (It means in the range where minimum is equal to 1
and maximum is not specified -- 1,2,3,4,... ) I would like to range the
input only from the minimum value, but not from the maximum value.

Is any esay way how to do it? I've tried to specified this in
validation.xml, but it doesn't work as I want:



min
1






Thanks for helping.

Sporak


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



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



RE: Range validation by validation.xml

2003-11-26 Thread Robert Lamping
Dear Honza,

I would suggest you also supply the maximum value. 


max
99


The presentation in which you are working already knows something from the
data layer, i.e. the value must be greater than 0.
In order to prevent errors due to storing a value higher than the allowed
value, I would suggest you also enter the maximum value.
When you change the maximum allowed value in the table then indeed you have
to change the validation.xml.
When you rewrite your tests this need for adaptation will pop up.

Kind regards,

Robert


-Original Message-
From: Honza Spurný [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 26, 2003 9:25 AM
To: [EMAIL PROTECTED]
Subject: Range validation by validation.xml


Hi there,

I know, that is possible to validate throught validation.xml file if input
is integer in the specified range... But I would like to check, if the input
number is unsigned int. (It means in the range where minimum is equal to 1
and maximum is not specified -- 1,2,3,4,... ) I would like to range the
input only from the minimum value, but not from the maximum value.

Is any esay way how to do it? I've tried to specified this in
validation.xml, but it doesn't work as I want:



min
1






Thanks for helping.

Sporak


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



Range validation by validation.xml

2003-11-26 Thread Honza Spurný
Hi there,

I know, that is possible to validate throught validation.xml file if input
is integer in the specified range... But I would like to check, if the input
number is unsigned int. (It means in the range where minimum is equal to 1
and maximum is not specified -- 1,2,3,4,... ) I would like to range the
input only from the minimum value, but not from the maximum value.

Is any esay way how to do it? I've tried to specified this in
validation.xml, but it doesn't work as I want:



min
1






Thanks for helping.

Sporak


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



Re: validation.xml and validate() method

2003-11-24 Thread Sergey Smirnov
Your form-bean should expand org.apacher.struts.validator.ValidatorForm, not
just ActionForm, and your validate() should call validate() from super class
(ValidatorForm) to have validation.xml involved.


"Honza Spurný" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi there,
>
> as I can see, when I implement the validate() method in the ActionForm, it
> means, that validation throught validation.xml file (inner struts
> validation) stops to work.
>
> ??? Am I right ???
>
> This seems to me so... Am I doing something wrong? How can I walk throught
> both validation? If it is able, which one is first performed?
>
> Thanks for answers.
>
> Sporak




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



Re: validation.xml and validate() method

2003-11-24 Thread Dirk Markert
Hello Sporak,

   call super.validate().

***

HS> Hi there,

HS> as I can see, when I implement the validate() method in the ActionForm, it
HS> means, that validation throught validation.xml file (inner struts
HS> validation) stops to work.

HS> ??? Am I right ???

HS> This seems to me so... Am I doing something wrong? How can I walk throught
HS> both validation? If it is able, which one is first performed?

HS> Thanks for answers.

HS> Sporak


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



Regards,
Dirk

+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-->>>>>>> to success! <<<<<<-+ 


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



validation.xml and validate() method

2003-11-24 Thread Honza Spurný
Hi there,

as I can see, when I implement the validate() method in the ActionForm, it
means, that validation throught validation.xml file (inner struts
validation) stops to work.

??? Am I right ???

This seems to me so... Am I doing something wrong? How can I walk throught
both validation? If it is able, which one is first performed?

Thanks for answers.

Sporak


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



RE: Can I use action path instead of form name in in validation.xml?

2003-11-13 Thread Robert Taylor
You will also need to set the 'type' attribute value in the form-bean
element of the struts-config file to

org.apache.struts.validator.DynaValidatorActionForm (or a subclass thereof)



robert

> -Original Message-
> From: Kevin Wang [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 13, 2003 2:14 PM
> To: Struts Users Mailing List
> Subject: RE: Can I use action path instead of form name in  name="xxx"> in validation.xml?
>
>
>
>
>
>
> Thanks Robert! Right now my forms are extending ActionForm. Can I
> just make
> them extend DynaValidatorActionForm without changing anything
> else? What do
> I need to change if I do need to?
>
> Kevin
>
>
>
>
>
>   "Robert Taylor"
>
>   <[EMAIL PROTECTED]To:   "Struts
> Users Mailing List" <[EMAIL PROTECTED]>
>   .com>cc:
>
>        Subject:  RE: Can
> I use action path instead of form name in  in
>   11/13/2003 11:19  validation.xml?
>
>   AM
>
>   Please respond to
>
>   "Struts Users
>
>   Mailing List"
>
>
>
>
>
>
>
> Yes. You can do this, but you have to use or subclass
> DynaValidatorActionForm.
> It uses the "path" attribute of the action mapping to determine validation
> rules
> for the request.
>
> robert
>
> > -Original Message-
> > From: Kevin Wang [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, November 13, 2003 12:13 PM
> > To: [EMAIL PROTECTED]
> > Subject: Can I use action path instead of form name in 
> > in validation.xml?
> >
> >
> >
> >
> >
> >
> >
> > I can't use the form names  because in our application all the
> > forms are by
> > the same session attribute.
> > I read from somewhere that I can do something like,
> >
> > 
> >   
> >   
> >   
> > 
> >
> >
> > But I haven't been successful...Please advice, Thanks!
> >
> > Kevin
> >
> >
> > -
> > 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]
>
>
>
>
> -
> 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]



RE: Can I use action path instead of form name in in validation.xml?

2003-11-13 Thread Kevin Wang




Thanks Robert! Right now my forms are extending ActionForm. Can I just make
them extend DynaValidatorActionForm without changing anything else? What do
I need to change if I do need to?

Kevin



   

  "Robert Taylor"  

  <[EMAIL PROTECTED]To:   "Struts Users Mailing List" 
<[EMAIL PROTECTED]>  
  .com>cc: 

   Subject:  RE: Can I use action path 
instead of form name in  in
  11/13/2003 11:19  validation.xml?

  AM   

  Please respond to

  "Struts Users

  Mailing List"

   





Yes. You can do this, but you have to use or subclass
DynaValidatorActionForm.
It uses the "path" attribute of the action mapping to determine validation
rules
for the request.

robert

> -Original Message-
> From: Kevin Wang [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 13, 2003 12:13 PM
> To: [EMAIL PROTECTED]
> Subject: Can I use action path instead of form name in 
> in validation.xml?
>
>
>
>
>
>
>
> I can't use the form names  because in our application all the
> forms are by
> the same session attribute.
> I read from somewhere that I can do something like,
>
> 
>   
>   
>   
> 
>
>
> But I haven't been successful...Please advice, Thanks!
>
> Kevin
>
>
> -
> 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]




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



RE: Can I use action path instead of form name in in validation.xml?

2003-11-13 Thread Robert Taylor
Yes. You can do this, but you have to use or subclass
DynaValidatorActionForm.
It uses the "path" attribute of the action mapping to determine validation
rules
for the request.

robert

> -Original Message-
> From: Kevin Wang [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 13, 2003 12:13 PM
> To: [EMAIL PROTECTED]
> Subject: Can I use action path instead of form name in 
> in validation.xml?
>
>
>
>
>
>
>
> I can't use the form names  because in our application all the
> forms are by
> the same session attribute.
> I read from somewhere that I can do something like,
>
> 
>   
>   
>   
> 
>
>
> But I haven't been successful...Please advice, Thanks!
>
> Kevin
>
>
> -
> 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]



Can I use action path instead of form name in in validation.xml?

2003-11-13 Thread Kevin Wang





I can't use the form names  because in our application all the forms are by
the same session attribute.
I read from somewhere that I can do something like,


  
  
  



But I haven't been successful...Please advice, Thanks!

Kevin


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



validation.xml

2003-11-04 Thread Rajat Pandit
hello,
i am looking for some documentation on the validation(Client end) for 
struts. there are so many of them, date, creditcard etc, and i am still 
using my own regex for making them work. i would be glad if someone 
could give me pointers for tutorials/documentation etc.
thanks
--

Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]


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


RE: dtd check on validation.xml: date pattern

2003-10-31 Thread Yansheng Lin
I think you can do something like this:



Don't know exact syntax though unfortunately:).


-Original Message-
From: Robert Lamping [mailto:[EMAIL PROTECTED] 
Sent: October 31, 2003 4:09 PM
To: Struts Users Mailing List
Subject: dtd check on validation.xml: date pattern


I made a stupid mistake. I intended to validate a date and entered the
following




Pattern
dd-MM-



On one machine this worked, as the DateFormat.SHORT format was obviously the
one I intended.
But at my laptop fortunately this didn't work, so I found the error. 

"Pattern" of course should be datePattern or datePatternStrict.

I tried to check the validation.xml with the dtd by adding the dtd to the
XML file and placing the dtd-file in the same directory as the
validation.xml.
With a XML plugin for Eclipse I can validate the 



I would like to limit var-name to certain values. Like datePattern, min,
max, maxLenght etc. 
As I don't know enough about DTDs, my question is: how do I built in such a
dtd-check?

Kind regards,

Robert Lamping
The Netherlands


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



dtd check on validation.xml: date pattern

2003-10-31 Thread Robert Lamping
I made a stupid mistake. I intended to validate a date and entered the
following




Pattern
dd-MM-



On one machine this worked, as the DateFormat.SHORT format was obviously the
one I intended.
But at my laptop fortunately this didn't work, so I found the error. 

"Pattern" of course should be datePattern or datePatternStrict.

I tried to check the validation.xml with the dtd by adding the dtd to the
XML file and placing the dtd-file in the same directory as the
validation.xml.
With a XML plugin for Eclipse I can validate the 



I would like to limit var-name to certain values. Like datePattern, min,
max, maxLenght etc. 
As I don't know enough about DTDs, my question is: how do I built in such a
dtd-check?

Kind regards,

Robert Lamping
The Netherlands


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



Re: Why write javascript in validation.xml file

2003-08-21 Thread sreekant_gottimukkala

Is the generated javascript compatible for both IE and NS ??

Regards
Sreekant G
@ 98404-65630


   

"Nagendra  

Kumar O V S" To: <[EMAIL PROTECTED]>   
   
<[EMAIL PROTECTED]   cc:   

o.com>   Subject: Re: Why write javascript in 
validation.xml file  
   

08/21/2003 

11:27 AM   

Please respond 

to "Struts 

Users Mailing  

List"  

   

   




   

 hi madhu, 

 validator framework is used for both client as well as server side validations. 
javascript
 for client side and java method class for the server side.

   

 -- nagi   

   

 ---Original Message---

   

 From: Struts Users Mailing List   

 Date: Thursday, August 21, 2003 11:09:45 AM   

 To: Struts Users Mailing List 

 Subject: Why write javascript in validation.xml file  

   

 Hi,   

   

 I am slightly confused on the use of the validation.xml file. If you can  

 specify the java class to do the validation, why is there an option of

 entering javascript also to do the validation?

   

 Regards,  

 Madhu 

   

   

 - 

 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional co

Re: Why write javascript in validation.xml file

2003-08-20 Thread Nagendra Kumar O V S








  hi madhu,
  validator framework is used for both client as well as server side 
  validations. _javascript_ for client side and java method class for the 
  server side. 
   
  -- nagi
   
  ---Original Message---
   
  
  From: Struts Users Mailing 
  List
  Date: Thursday, August 
  21, 2003 11:09:45 AM
  To: Struts Users Mailing 
  List
  Subject: Why write 
  _javascript_ in validation.xml file
   Hi,I am slightly confused on the use of the 
  validation.xml file. If you canspecify the java class to do the 
  validation, why is there an option ofentering _javascript_ also to do 
  the 
  validation?Regards,Madhu-To 
  unsubscribe, e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED].





	
	
	
	
	
	
	




  IncrediMail - 
Email has finally evolved - Click 
Here



Why write javascript in validation.xml file

2003-08-20 Thread Madhu Nair

Hi,

I am slightly confused on the use of the validation.xml file. If you can
specify the java class to do the validation, why is there an option of
entering javascript also to do the validation?

Regards,
Madhu


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



Re: ValidatorForm and validation.xml

2003-07-29 Thread Jim Bruno Goldberg
My action-mapping is the follows:


 








Is that right, isn't? Thanks for help.


"Raible, Matt" wrote:
> 
> Make sure you have validate="true" on your action-mapping.
> 
> -Original Message-
> From: Jim Bruno Goldberg [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 29, 2003 4:14 PM
> To: [EMAIL PROTECTED]
> Subject: ValidatorForm and validation.xml
> 
> Hi, folks.
> 
> I am trying to use validation.xml, but it does not working.
> Some info:
> 
> my struts-config.xml:
> 
> (...)
>  type="adama.sell.PersonEspecieForm"/>
> (...)
> 
>      property="pathnames"
> value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
> 
> (...)
> 
> my validation.xml:
> (...)
>  
> 
> 
>  property="name"
> depends="required"/>
> 
>  
>  
> (...)
> 
> my Form Class:
> (...)
> public class PersonEspecieForm
> extendsorg.apache.struts.validator.ValidatorForm
> implements java.io.Serializable
> {
> protected long oid;
> protected java.lang.String descr;
> protected java.lang.String name;
> protected java.util.List all;
> 
> /** Construtor vazio padrão */
> public PersonEspecieForm() {}
> 
> public long getOid()
> {
> return this.oid;
> }
> 
> public void setOid( long oid )
> {
> this.oid = oid;
> }
> 
> public java.lang.String getName()
> {
> return this.name;
> }
> 
> public void setName( java.lang.String descr )
> {
> this.name = descr;
> }
> 
> (...some getters, setters, but no validate method...)
> 
> }
> 
> There are something wrong, but I try find it all day and nothing. Can
> anyone (please) help me?
> The struts just ignorate de validation.xml configuration.
> Thanks Everybody.
> 
> --
>  CUL8R,[]s
>  Jim Bruno Goldberg
> http://www.md5.com.br
> 
> -
> 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]

-- 
 CUL8R,[]s
 Jim Bruno Goldberg
http://www.md5.com.br

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



Re: ValidatorForm and validation.xml

2003-07-29 Thread Jim Bruno Goldberg

Ok, but I do that. My jsp page:


(...)

<!--
<html:javascript formName="PersonEspecieForm" />
-->


(...)


(...)


But I trying to validate it on server-side, before. :
..and does not work.
Thanks meanwhile;)



Suzette Daniel wrote:
> 
> You just missed the last 2 steps, you need to call the javascript on submit
> so the validation can be done and include the javascript validation.
> 
> Example:
> 1-
>  onsubmit="return validateModelInfoForm(this)">
> 
> 2-
> 
> Suzette H. Daniel
> -Original Message-
> From: Raible, Matt [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 29, 2003 6:07 PM
> To: 'Struts Users Mailing List'
> Subject: RE: ValidatorForm and validation.xml
> 
> Make sure you have validate="true" on your action-mapping.
> 
> -Original Message-
> From: Jim Bruno Goldberg [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 29, 2003 4:14 PM
> To: [EMAIL PROTECTED]
> Subject: ValidatorForm and validation.xml
> 
> Hi, folks.
> 
> I am trying to use validation.xml, but it does not working. Some
> info:
> 
> my struts-config.xml:
> 
> (...)
> 
> (...)
> 
>  property="pathnames"
> value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
> 
> (...)
> 
> my validation.xml:
> (...)
>  
> 
> 
>  property="name"
> depends="required"/>
> 
>  
>  
> (...)
> 
> my Form Class:
> (...)
> public class PersonEspecieForm
> extendsorg.apache.struts.validator.ValidatorForm
> implements java.io.Serializable
> {
> protected long oid;
> protected java.lang.String descr;
> protected java.lang.String name;
> protected java.util.List all;
> 
> /** Construtor vazio padrão */
> public PersonEspecieForm() {}
> 
> public long getOid()
> {
> return this.oid;
> }
> 
> public void setOid( long oid )
> {
> this.oid = oid;
> }
> 
> public java.lang.String getName()
> {
> return this.name;
> }
> 
> public void setName( java.lang.String descr )
> {
> this.name = descr;
> }
> 
> (...some getters, setters, but no validate method...)
> 
> }
> 
> There are something wrong, but I try find it all day and nothing. Can anyone
> (please) help me? The struts just ignorate de validation.xml
> configuration.
> Thanks Everybody.
> 
> --
>  CUL8R,[]s
>  Jim Bruno Goldberg
> http://www.md5.com.br
> 
> -
> 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]
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
 CUL8R,[]s
 Jim Bruno Goldberg
http://www.md5.com.br

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



RE: ValidatorForm and validation.xml

2003-07-29 Thread Suzette Daniel
You just missed the last 2 steps, you need to call the javascript on submit
so the validation can be done and include the javascript validation.

Example:
1-


2-

Suzette H. Daniel
-Original Message-
From: Raible, Matt [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 29, 2003 6:07 PM
To: 'Struts Users Mailing List'
Subject: RE: ValidatorForm and validation.xml


Make sure you have validate="true" on your action-mapping.

-Original Message-
From: Jim Bruno Goldberg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 4:14 PM
To: [EMAIL PROTECTED]
Subject: ValidatorForm and validation.xml


Hi, folks.

    I am trying to use validation.xml, but it does not working. Some
info:

my struts-config.xml:


(...)

(...)

    

(...)


----my validation.xml:
(...)
 



   
 
 
(...)

my Form Class:
(...)
public class PersonEspecieForm
extendsorg.apache.struts.validator.ValidatorForm
implements java.io.Serializable
{
protected long oid;
protected java.lang.String descr;
protected java.lang.String name;
protected java.util.List all;

/** Construtor vazio padrão */
public PersonEspecieForm() {}

public long getOid()
{
return this.oid;
}

public void setOid( long oid )
{
this.oid = oid;
}

public java.lang.String getName()
{
return this.name;
}

public void setName( java.lang.String descr )
{
this.name = descr;
}

(...some getters, setters, but no validate method...)

}


There are something wrong, but I try find it all day and nothing. Can anyone
(please) help me? The struts just ignorate de validation.xml
configuration.
Thanks Everybody.


-- 
 CUL8R,[]s
 Jim Bruno Goldberg
http://www.md5.com.br

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

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



RE: ValidatorForm and validation.xml

2003-07-29 Thread Raible, Matt
Make sure you have validate="true" on your action-mapping.

-Original Message-
From: Jim Bruno Goldberg [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 29, 2003 4:14 PM
To: [EMAIL PROTECTED]
Subject: ValidatorForm and validation.xml


Hi, folks.

I am trying to use validation.xml, but it does not working.
Some info:

my struts-config.xml:


(...)

(...)



(...)


my validation.xml:
(...)
 



   
 
 
(...)

my Form Class:
(...)
public class PersonEspecieForm
extendsorg.apache.struts.validator.ValidatorForm
implements java.io.Serializable
{
protected long oid;
protected java.lang.String descr;
protected java.lang.String name;
protected java.util.List all;

/** Construtor vazio padrão */
public PersonEspecieForm() {}

public long getOid()
{
return this.oid;
}

public void setOid( long oid )
{
this.oid = oid;
}

public java.lang.String getName()
{
return this.name;
}

public void setName( java.lang.String descr )
{
this.name = descr;
}

(...some getters, setters, but no validate method...)

}


There are something wrong, but I try find it all day and nothing. Can
anyone (please) help me?
The struts just ignorate de validation.xml configuration.
Thanks Everybody.


-- 
 CUL8R,[]s
 Jim Bruno Goldberg
http://www.md5.com.br

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



ValidatorForm and validation.xml

2003-07-29 Thread Jim Bruno Goldberg
Hi, folks.

I am trying to use validation.xml, but it does not working.
Some info:

my struts-config.xml:


(...)

(...)



(...)


my validation.xml:
(...)
 



   
 
 
(...)

my Form Class:
(...)
public class PersonEspecieForm
extendsorg.apache.struts.validator.ValidatorForm
implements java.io.Serializable
{
protected long oid;
protected java.lang.String descr;
protected java.lang.String name;
protected java.util.List all;

/** Construtor vazio padrão */
public PersonEspecieForm() {}

public long getOid()
{
return this.oid;
}

public void setOid( long oid )
{
this.oid = oid;
}

public java.lang.String getName()
{
return this.name;
}

public void setName( java.lang.String descr )
{
this.name = descr;
}

(...some getters, setters, but no validate method...)

}


There are something wrong, but I try find it all day and nothing. Can
anyone (please) help me?
The struts just ignorate de validation.xml configuration.
Thanks Everybody.


-- 
 CUL8R,[]s
 Jim Bruno Goldberg
http://www.md5.com.br

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



message resource in validation.xml [part2]

2003-06-17 Thread salgado . pc

I am searching for a way to separate my error message resource bundle from my 
application message resource bundle.
Although, the post below answers part of my questions there is still one problem:

If i use validator to generate javascript validation, the message printed in the 
window dont know nothing about any message resource bundles...
(i cant use ).

Open to suggestions...

Pedro Salgado

- - - - - - - - - - -

Hi Mahesh,

You can certainly specify a message in another bundle:

Here's the validation.xml for my field, "longField"






Here's where I put longField on a form, along with display of an error message
from a validation-specific message resource file (note bundle= ):




Here's where the separate bundle is incorporated in my struts-config.xml file:




and the error message from ValidatorResources.properties looked like:

errors.long={0} must be a long.

HTH,

-jeff


On Monday, March 31, 2003, at 04:35 PM, Bhagia, Mahesh wrote:



Hi,


Is there any way to change / specify message resource bundle in
validation.xml / validation-rules.xml.
validation_1_1.dtd  doesn't seem to define that ... (i guess it assumes
  key from default
message resource)

or is there a way to change message resource in Plug-in class (may be extend
it)

Thanks

Mahesh Bhagia




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



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



Re: conditional validation in validation.xml

2003-06-14 Thread Gregory F. March

On Jun 13, 2003, Jordan Reed <[EMAIL PROTECTED]>  wrote:

 |So what the validator does is only validate the field if the page attribute
 |is >=.

Right, and that's my problem.  I want the validation when the page
attribute == the value.

My form is "generally" created in page order, but not always, hence my
need for this feature.

I guess I'll have to write my own validator.

/greg

--
Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet

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



RE: conditional validation in validation.xml

2003-06-13 Thread Bailey, Shane C.
 
I have not attempted what you are trying to do yet but I am
very soon.  So while I was thinking about it...

For the example you gave should you have used requiredif instead
of required as the depends value?

Also, I think it might be easier to Use a DynaValidatorActionForm
and then have validation done like so:

Assume your ActionForm in session scope.

validation.xml:

















struts config:





Since the ValidatorActionForm family validates per action
and the ValidatorForm family validates per form won't this
work?




-Original Message-
From: Jordan Reed
To: Struts Users Mailing List
Sent: 6/13/2003 9:38 PM
Subject: Re: conditional validation in validation.xml

The Validator has some concept with the page attribute.  If you look at
the
"Multi Page Form" section you get a hint at it:
http://jakarta.apache.org/struts/userGuide/dev_validator.html


In your jsp you need an element called page.  I usually just put a
static
hidden tag:


Then in your validation.xml you associated a page number with the
element:


So what the validator does is only validate the field if the page
attribute
is >=.

So for this example above... The "user.firstName" field would NOT be
validated on page 1, but would be validated on page 2, page 3, etc.

-Jordan Reed (http://www.chaosserver.net)



On 6/13/03 5:40 AM, "Gregory F. March" <[EMAIL PROTECTED]> wrote:

> 
> I'm using a DynaValidatorForm with validation rules in
> validation.xml.  My form is a multipage form, and I (obviously) would
> like to validate only the parameters "in scope" for the current page.
> 
> Can this be done through the xml file (if so, how)?  Or do I need to
> write my own validation class that looks at a "page" variable?
> 
> Thanks!
> 
> /greg
> 
> --
> Gregory F. March-=-http://www.gfm.net:81/~march-=-
AIM:GfmNet


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



Re: conditional validation in validation.xml

2003-06-13 Thread Jordan Reed
The Validator has some concept with the page attribute.  If you look at the
"Multi Page Form" section you get a hint at it:
http://jakarta.apache.org/struts/userGuide/dev_validator.html


In your jsp you need an element called page.  I usually just put a static
hidden tag:


Then in your validation.xml you associated a page number with the element:


So what the validator does is only validate the field if the page attribute
is >=.

So for this example above... The "user.firstName" field would NOT be
validated on page 1, but would be validated on page 2, page 3, etc.

-Jordan Reed (http://www.chaosserver.net)



On 6/13/03 5:40 AM, "Gregory F. March" <[EMAIL PROTECTED]> wrote:

> 
> I'm using a DynaValidatorForm with validation rules in
> validation.xml.  My form is a multipage form, and I (obviously) would
> like to validate only the parameters "in scope" for the current page.
> 
> Can this be done through the xml file (if so, how)?  Or do I need to
> write my own validation class that looks at a "page" variable?
> 
> Thanks!
> 
> /greg
> 
> --
> Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet


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



conditional validation in validation.xml

2003-06-13 Thread Gregory F. March

I'm using a DynaValidatorForm with validation rules in
validation.xml.  My form is a multipage form, and I (obviously) would
like to validate only the parameters "in scope" for the current page.

Can this be done through the xml file (if so, how)?  Or do I need to
write my own validation class that looks at a "page" variable?

Thanks!

/greg

--
Gregory F. March-=-http://www.gfm.net:81/~march-=-AIM:GfmNet

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



How to do inherited validation using validation.xml

2003-04-03 Thread Kartik Shah
Hi,

I am desigining an application, in which I have action
forms that inherit from other created action forms.
E.g 
public class BaseActionForm extends ValidatorAction
{
private String attributeOne;
private String attributeTwo;
}

public class ExtendedActionForm extends BaseActionForm
{
private String attributeThree;
private String attributeFour;
}

Now I have validations defined for BaseActionForm in
the validationConfig, now I need to add validation for
ExtendedActionForm, in which I want to mention to
implicitly include all the validations mentioned in
BaseActionForm. 

How can I achive this, can someone please help me.

Regards

Kartik



Missed your favourite TV serial last night? Try the new, Yahoo! TV.
   visit http://in.tv.yahoo.com

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



How to do inherited validation using validation.xml

2003-04-03 Thread Kartik Shah
Hi,

I am desigining an application, in which I have action forms that inherit from other 
created action forms.
E.g 
public class BaseActionForm extends ValidatorAction
{
private String attributeOne;
private String attributeTwo;
}

public class ExtendedActionForm extends BaseActionForm
{
private String attributeThree;
private String attributeFour;
}

Now I have validations defined for BaseActionForm in the validationConfig, now I need 
to add validation for ExtendedActionForm, in which I want to mention to implicitly 
include all the validations mentioned in BaseActionForm. 

How can I achive this, can someone please help me.

Regards

Kartik



Get Your Private, Free E-mail from Indiatimes at http://email.indiatimes.com

 Buy The Best In BOOKS at http://www.bestsellers.indiatimes.com

Bid for for Air Tickets @ Re.1 on Air Sahara Flights. Just log on to 
http://airsahara.indiatimes.com and Bid Now !


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



Re: message resource in validation.xml

2003-03-31 Thread Jeff Kyser
Hi Mahesh,

You can certainly specify a message in another bundle:

Here's the validation.xml for my field, "longField"




Here's where I put longField on a form, along with display of an error 
message
from a validation-specific message resource file (note bundle= ):




Here's where the separate bundle is incorporated in my  
struts-config.xml file:


   null="false"
   key="VALIDATOR_BUNDLE">


and the error message from ValidatorResources.properties looked like:

	errors.long={0} must be a long.

HTH,

-jeff

On Monday, March 31, 2003, at 04:35  PM, Bhagia, Mahesh wrote:

Hi,

Is there any way to change / specify message resource bundle in
validation.xml / validation-rules.xml.
validation_1_1.dtd  doesn't seem to define that ... (i guess it assumes
  key from default
message resource)
or is there a way to change message resource in Plug-in class (may be 
extend
it)

Thanks

Mahesh Bhagia	



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


message resource in validation.xml

2003-03-31 Thread Bhagia, Mahesh

Hi,

Is there any way to change / specify message resource bundle in
validation.xml / validation-rules.xml.
validation_1_1.dtd  doesn't seem to define that ... (i guess it assumes
  key from default
message resource)

or is there a way to change message resource in Plug-in class (may be extend
it)

Thanks

Mahesh Bhagia   



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



Field by field validation using validation.xml

2003-03-24 Thread Simon Kelly
Hi,

I'm stuck with a little problem on validation, where an empty field can be
valid if there is content in another field.  I can't work out how to put
this into the validation file.  I can see how to check for content, but not
dependancies on other field content.

Any help would be appreciated.

Cheers

Simon



Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [EMAIL PROTECTED]


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



Tag to generate Forms Base on the properties of validation.xml

2003-03-18 Thread Jesús Pérez
Hello

   I am trying to create a generic JSP that will be able to generate a Form
based on the properties that are defined in
 the validation.xml.
I don´t know if it will be posible to develop a Tag that with the name
of the Form, retrieve the properties from
  the XML and generates the complete form with all the properties. Also I
would like to include the javascript generation
  that are defined in the validator-rules.xml.

Do you think that is a good idea or there are another way to do that?

   Thanks in advance.


   Jesús Pérez



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



Re: validation.xml and Timestamp

2003-03-17 Thread Jeff Kyser
You could certainly use a depends='mask' and the appropriate regular 
expression.

-jeff

On Monday, March 17, 2003, at 08:32  AM, Ferran Parra wrote:

I'm using struts validator for all dates and it works fine for simple 
dates.
The entry in validation.xml file is like this.

  
   
 
   datePatternStrict
   dd/MM/ 
 

How can i validate datetime field using the same procedure using  
format
string "dd/MM/ HH:SS" (timeStamp)?

---
Ferran Parra
[EMAIL PROTECTED]
http://www.mubimedia.com
MUBIMEDIA S.L.
C/ Mallorca, 275, 1r 2a 08008 BCN
Tel: 93 215 21 91 / Fax: 93 215 41 21
---
-
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]


validation.xml and Timestamp

2003-03-17 Thread Ferran Parra

I'm using struts validator for all dates and it works fine for simple dates.
The entry in validation.xml file is like this.

  
   
 
   datePatternStrict
   dd/MM/ 
 


How can i validate datetime field using the same procedure using  format
string "dd/MM/ HH:SS" (timeStamp)?

---
Ferran Parra
[EMAIL PROTECTED]
http://www.mubimedia.com
MUBIMEDIA S.L.
C/ Mallorca, 275, 1r 2a 08008 BCN
Tel: 93 215 21 91 / Fax: 93 215 41 21
---


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



Re: Struts Validator: validation.xml : Doubts

2003-02-13 Thread Steve Stair
Just as with the struts-config.xml, the best documentation is in the
DTD.

http://jakarta.apache.org/commons/dtds/validator_1_0.dtd




--
Steve Stair
[EMAIL PROTECTED]
(512) 463-7991

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




Struts Validator: validation.xml : Doubts

2003-02-12 Thread Amit Keshav Kulkarni
Hi All,
I am unable to find any documentation that explains the various attributes 
used in the validation.xml file, say field.

 
 
 
 
 
   mask
   ^[a-zA-Z]*$
 
 
   maxlength
   10
 
 

By running an application using the validation 
I could figure out that arg0, arg1 are the parameters that 
are used while creating the error messages
But I have many doubts @ the same.
If arg0 is the argument for first rule 'required'
why is the argument for third rule 'maxlength' named arg1 and not arg2 ?

Does the 'msg' tag require the same name as the rule for which it is to be
displayed?

Any pointers to fundas of Regular Expression?

Thanks and Regards,

Amit.

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




Validating a "long" using validation.xml accepts all values

2003-02-04 Thread Sakke Wiik
I don't have problems with any validations except validating
longs. I'm trying to validate a long value using DynaValidatorForm.

If i put something else than a long as a
requestparameter(/theAction?id=someletters),
the validator does not return an error. Instead the action is called, which
gets
the value 0(zero) from the form. Shouldn't the validator return an error?

struts-config.xml:

  





validation.xml:

  
   
  



cheers,
Sakke Wiik


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




DateTime,TimeStamp field validations in validation.xml

2003-02-04 Thread Arunachalam Jaisankar
Hi all,

I'm using struts validator for all dates and it works fine for simple dates.
The entry in validation.xml file is like this.

  
   
 
   datePatternStrict
   dd/MM/ 
 


How can i validate datetime field using the same procedure using  format
string "dd/MM/ HH:SS" ?
Help required.

thanks & regards
Jai


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




RE: how to keep the escaped dashes in string parameters in validation.xml?

2003-02-03 Thread Brandon Goodin
Can I see your jsp tag code for the particular property that is being
validated? If you are using a struts tag... It sounds like the tag is
inserting the delimiter in order to preserve the delimiter for the mask
expression. I have not run in to this problem so I don't want to waste your
time. I can only guess at what it is. I can maybe provide you an answer if I
see your code.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: Ginger Cheng [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 2:21 PM
To: Struts Users Mailing List
Subject: RE: how to keep the escaped dashes in string parameters in
validation.xml?


Hi, i tried it in validation.xml but they end up 8 '\' in the html
generated from my jsp. May I have more hint? Thank you.
 ginger

At 02:00 PM 2/3/2003 -0700, you wrote:
>append 4 backslashed (). That works for me when I want '\w' instead of
>'w'. So you start off with w then you wind up with \\w and finally \w.
>
>Brandon Goodin
>Phase Web and Multimedia
>P (406) 862-2245
>F (406) 862-0354
>[EMAIL PROTECTED]
>http://www.phase.ws
>
>
>-Original Message-
>From: Ginger Cheng [mailto:[EMAIL PROTECTED]]
>Sent: Monday, February 03, 2003 1:52 PM
>To: [EMAIL PROTECTED]
>Subject: how to keep the escaped dashes in string parameters in
>validation.xml?
>
>
>Hello,
> I tried to implement a conditional mask in javascript. The source
> file
>(htmL) of the browser escaped all the dashes in my mask string correctly.
>What happens is the escaped dashes in my mask string all disappear
>when  they come to the javascript function in validator-rules.xml. For
>example, I use '\w' to stand for all the word chars in my mask string in
>validation.xml, in the html, it is '\\w', but it is 'w' in the javascript
>function in validator-rules.xml. I am using the 1.1-beta3. Thank you for
>any help.
> ginger
>
>
>-
>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]


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




RE: how to keep the escaped dashes in string parameters in validation.xml?

2003-02-03 Thread Ginger Cheng
Hi, i tried it in validation.xml but they end up 8 '\' in the html 
generated from my jsp. May I have more hint? Thank you.
ginger

At 02:00 PM 2/3/2003 -0700, you wrote:
append 4 backslashed (). That works for me when I want '\w' instead of
'w'. So you start off with w then you wind up with \\w and finally \w.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: Ginger Cheng [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 1:52 PM
To: [EMAIL PROTECTED]
Subject: how to keep the escaped dashes in string parameters in
validation.xml?


Hello,
I tried to implement a conditional mask in javascript. The source 
file
(htmL) of the browser escaped all the dashes in my mask string correctly.
What happens is the escaped dashes in my mask string all disappear
when  they come to the javascript function in validator-rules.xml. For
example, I use '\w' to stand for all the word chars in my mask string in
validation.xml, in the html, it is '\\w', but it is 'w' in the javascript
function in validator-rules.xml. I am using the 1.1-beta3. Thank you for
any help.
ginger


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


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




RE: how to keep the escaped dashes in string parameters in validation.xml?

2003-02-03 Thread Brandon Goodin
append 4 backslashed (). That works for me when I want '\w' instead of
'w'. So you start off with w then you wind up with \\w and finally \w.

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws


-Original Message-
From: Ginger Cheng [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 03, 2003 1:52 PM
To: [EMAIL PROTECTED]
Subject: how to keep the escaped dashes in string parameters in
validation.xml?


Hello,
I tried to implement a conditional mask in javascript. The source file
(htmL) of the browser escaped all the dashes in my mask string correctly.
What happens is the escaped dashes in my mask string all disappear
when  they come to the javascript function in validator-rules.xml. For
example, I use '\w' to stand for all the word chars in my mask string in
validation.xml, in the html, it is '\\w', but it is 'w' in the javascript
function in validator-rules.xml. I am using the 1.1-beta3. Thank you for
any help.
ginger


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




how to keep the escaped dashes in string parameters in validation.xml?

2003-02-03 Thread Ginger Cheng
Hello,
	I tried to implement a conditional mask in javascript. The source file 
(htmL) of the browser escaped all the dashes in my mask string correctly. 
What happens is the escaped dashes in my mask string all disappear 
when  they come to the javascript function in validator-rules.xml. For 
example, I use '\w' to stand for all the word chars in my mask string in 
validation.xml, in the html, it is '\\w', but it is 'w' in the javascript 
function in validator-rules.xml. I am using the 1.1-beta3. Thank you for 
any help.
	ginger


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



AW: XML Include for validation.xml

2002-11-25 Thread Andreas Langmann
>At the same level, have you tried:
>
  ^
yes parser says something about relative uri not allowed without base
uri. think it's a bug in common-validation?


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




RE: XML Include for validation.xml

2002-11-25 Thread James Mitchell
At the same level, have you tried:

   ^


--
James Mitchell
Software Engineer/Struts Evangelist
http://www.open-tools.org

"If you were plowing a field, which would you rather use? Two strong oxen or
1024 chickens?"
- Seymour Cray (1925-1996), father of supercomputing


> -Original Message-
> From: Andreas Langmann [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 25, 2002 6:05 AM
> To: Struts User Mailingliste
> Subject: XML Include for validation.xml
>
>
> Hello,
>
> i tried the following:
>
> **
> 
>
>  [
> "file://C:/Programme/eclipse/workspace/appl/build/webapp/WEB-INF/validation/
> validation-a.xml">
> "file://C:/Programme/eclipse/workspace/appl/build/webapp/WEB-INF/validation/
> validation-b.xml">
>
> ]>
>
> 
>   
> &a;
>
> &b;
>
> &c;
>   
> 
> *
>
> and it works... but how can i use relative url's for the included files?
> This example loads validation-a, and validation-b, but not c...
>
> I dont want to use "http://127.0.0.1/...xml"; because i dont want to give the
> xml files to public http access
>
> The same problem in struts-config xml for including form-bean-definitions
> was no problem... it works fine, but here i got problems with missing dtd if
> i use the header from struts-examples...
>
> tia
>
> Andreas
>
>
> --
> 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]>




XML Include for validation.xml

2002-11-25 Thread Andreas Langmann
Hello,

i tried the following:

**



   
   
]>


  
&a;

&b;

&c;
  

*

and it works... but how can i use relative url's for the included files?
This example loads validation-a, and validation-b, but not c...

I dont want to use "http://127.0.0.1/...xml"; because i dont want to give the
xml files to public http access

The same problem in struts-config xml for including form-bean-definitions
was no problem... it works fine, but here i got problems with missing dtd if
i use the header from struts-examples...

tia

Andreas


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




Multilanguage in validation.xml

2002-11-13 Thread Alireza Fattahi
Hi,

I try to use Multilanguage in validation.xml. I used the language attribute
in formset:



But it seems that only the default language validations are checked.
Should set any thing else? 

When I read the session with <%=session.getAttribute( Action.LOCALE_KEY )%>
in my jsp page the returned value is same as what I used in formset tag
"fa".

Alireza


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Validation.xml message processing

2002-11-12 Thread Raghu Sinha
I have a validator using a mask, I was trying to display the custom message
for this mask. The field defination is like

 
 
 
 
   maxlength
   10
 
 
   mask
   ${salesVolume}
 
 

For the custom message for the mask I tried using

, I did not see the desired
message. Everything else was fine. I was still getting "Field Invalid"
error.

I also tried to use



This shows a problem with the validation.xml.

Could you suggest as to how I can get the custom message to show up, instead
of the "Field Invalid" error?

Thanks

Raghu Sinha
[EMAIL PROTECTED]
(212)741-0409x110


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>




Global Field Definitions in validation.xml?

2002-07-24 Thread Hirsch Richard

We have a large number of forms with similar fields (First Name, Last name,
etc.) We would like to use the validation framework from struts to validate
our fields. Is it possible to create global definitions for field types? I
have never seen a DTD for the validation.xml file format, so I am in the
dark regrading the possible elements in the global tag. I know "constants"
and "validator" are possible. 

We need an entire definition of a field type. Example below:

   
  

 
 
 
 
   mask
   ^\w+$
 
 
   minlength
   5
 
 
   maxlength
   6
 
   

   
  
 
 
 
 
  
  
 
 
 
  
   

That way changes to validation rules have global impact throughout the
application.

Thanks,

D.



Re: validation.xml

2002-06-05 Thread William W

Thanks !!! ;)


>From: "Adolfo Miguelez" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: validation.xml
>Date: Wed, 05 Jun 2002 13:46:50 +
>
>
>
>
>
>
>
>in struts-config.xml for Struts 1.1b1
>
>>From: "Radhika Nadkarni" <[EMAIL PROTECTED]>
>>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>To: [EMAIL PROTECTED]
>>Subject: Re: validation.xml
>>Date: Wed, 05 Jun 2002 11:12:24 +
>>
>>
>>hi,
>>configure it in web.xml file as
>>
>>  config
>>  /WEB-INF/validation.xml
>>
>>
>>
>>>From: "William W" <[EMAIL PROTECTED]>
>>>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>>To: [EMAIL PROTECTED]
>>>Subject: validation.xml
>>>Date: Tue, 04 Jun 2002 21:14:49 +
>>>
>>>
>>>
>>>I'm using Struts 1.1 b1.
>>>Where should I configure the validation.xml file ?
>>>Thanks,
>>>William.
>>>
>>>_
>>>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:
>>><mailto:[EMAIL PROTECTED]>
>>>For additional commands, e-mail:
>>><mailto:[EMAIL PROTECTED]>
>>>
>>
>>
>>_
>>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>>
>>
>>--
>>To unsubscribe, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>
>
>
>
>
>
>  
> Adolfo's signature
>  
>  
> Adolfo Rodriguez Miguelez
>
>  
>  
>
>
>
>
>
>_
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
>




_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




Re: validation.xml

2002-06-05 Thread James Holmes

Yes this works...only for Struts 1.1 though.  You can
easily manage this setting with the Struts Console:

http://www.jamesholmes.com/struts/

-james
[EMAIL PROTECTED]


--- Adolfo Miguelez <[EMAIL PROTECTED]> wrote:
> 
> 
className="org.apache.struts.validator.ValidatorPlugIn">
>  value="/WEB-INF/validator-rules.xml"/>
>  value="/WEB-INF/validation.xml"/>
> 
> 
> in struts-config.xml for Struts 1.1b1
> 
> >From: "Radhika Nadkarni" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Re: validation.xml
> >Date: Wed, 05 Jun 2002 11:12:24 +
> >
> >
> >hi,
> >configure it in web.xml file as
> >
> >  config
> > 
> /WEB-INF/validation.xml
> >
> >
> >
> >>From: "William W" <[EMAIL PROTECTED]>
> >>Reply-To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> >>To: [EMAIL PROTECTED]
> >>Subject: validation.xml
> >>Date: Tue, 04 Jun 2002 21:14:49 +
> >>
> >>
> >>
> >>I'm using Struts 1.1 b1.
> >>Where should I configure the validation.xml file ?
> >>Thanks,
> >>William.
> >>
>
>>_
> >>Send and receive Hotmail on your mobile device:
> http://mobile.msn.com
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
>
>><mailto:[EMAIL PROTECTED]>
> >>For additional commands, e-mail:
> >><mailto:[EMAIL PROTECTED]>
> >>
> >
> >
>
>_
> >Send and receive Hotmail on your mobile device:
> http://mobile.msn.com
> >
> >
> >--
> >To unsubscribe, e-mail:   
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail: 
> ><mailto:[EMAIL PROTECTED]>
> >
> 
> 
> 
> 
> 
>   
>  Adolfo's signature
>   
>   
>  Adolfo Rodriguez
> Miguelez
> 
>   
>   
> 
> 
> 
> 
> 
>
_
> Get your FREE download of MSN Explorer at
> http://explorer.msn.com/intl.asp.
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

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




Re: validation.xml

2002-06-05 Thread Adolfo Miguelez







in struts-config.xml for Struts 1.1b1

>From: "Radhika Nadkarni" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: validation.xml
>Date: Wed, 05 Jun 2002 11:12:24 +
>
>
>hi,
>configure it in web.xml file as
>
>  config
>  /WEB-INF/validation.xml
>
>
>
>>From: "William W" <[EMAIL PROTECTED]>
>>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>>To: [EMAIL PROTECTED]
>>Subject: validation.xml
>>Date: Tue, 04 Jun 2002 21:14:49 +
>>
>>
>>
>>I'm using Struts 1.1 b1.
>>Where should I configure the validation.xml file ?
>>Thanks,
>>William.
>>
>>_
>>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>>
>>
>>--
>>To unsubscribe, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>
>
>
>_
>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
>





  
 Adolfo's signature
  
  
 Adolfo Rodriguez Miguelez

  
  





_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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




Re: validation.xml

2002-06-05 Thread Radhika Nadkarni


hi,
configure it in web.xml file as

  config
  /WEB-INF/validation.xml



>From: "William W" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: validation.xml
>Date: Tue, 04 Jun 2002 21:14:49 +
>
>
>
>I'm using Struts 1.1 b1.
>Where should I configure the validation.xml file ?
>Thanks,
>William.
>
>_
>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
>


_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




validation.xml

2002-06-04 Thread William W



I'm using Struts 1.1 b1.
Where should I configure the validation.xml file ?
Thanks,
William.

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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