RE: Validation with validwhen
No, js support for validwhen is not provided. You can tell by looking at the validation-rules.xml file, which does not have a jsFunction attribute defined on the "validwhen" validator element. -Original Message- From: Cassio Pereira [mailto:[EMAIL PROTECTED] Sent: Friday, June 02, 2006 10:08 AM To: user@struts.apache.org Subject: Validation with validwhen Hi all. Simple question. Does "validwhen" works client side? Regards -- Cassio Santos Pereira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - The information contained in this message may be privileged, confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or any employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Paychex, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validation with validwhen
Hi all. Simple question. Does "validwhen" works client side? Regards -- Cassio Santos Pereira - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validation with validwhen
Thankyou all, for the help. I got it working now. Which make sure the user entered value is a double >= 0, otherwise a message is shown that it's not a valid number. Both the below are working fine. test (*this* >= 0) or test (*this* >= 0) From: "Chaudhary, Harsh" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: "Struts Users Mailing List" Subject: RE: validation with validwhen Date: Fri, 26 May 2006 11:56:35 -0500 "and getting the error when used double." Could you explain that? Like what exactly do you input when you get the error and what you input when you do not get an error. I just found recently that struts has a bug e.g. I have a field similar to yours which is a float and has float and floatRange validations. It has to be > 0. It catches the error when I input 0 because it has to be greater than 0. But when I input 0.0, I don't get an error. Maybe yours is a similar situation. Harsh. -Original Message- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Friday, May 26, 2006 11:51 AM To: user@struts.apache.org Subject: RE: validation with validwhen no, it's not a dumb question. But yah, I do have the key right!! and getting the error when used double. Using 1.2.7 version of struts. Actually I did try >(*this* > 0) too but, this didn't work either. I tried, the below too min0 maxDouble.MAX_VALUE double range from above, is not working right!! whatever number I give it's gives error. any other suggessions? Thanks. >From: "Chaudhary, Harsh" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: "Struts Users Mailing List" >Subject: RE: validation with validwhen >Date: Fri, 26 May 2006 10:20:01 -0500 > >Fea, >What version of struts are you using? Dumb question, but are you sure >the key "lbl.notvalidnumber" is spelled right in your error messages >properties file. > >Harsh. > >-Original Message- >From: Krishnan, Vijaya [mailto:[EMAIL PROTECTED] >Sent: Friday, May 26, 2006 10:07 AM >To: Struts Users Mailing List >Subject: RE: validation with validwhen > > > and also make sure it's value is greater than Zero. > >Do you need >= or > than 0? >(*this* > 0) might do the trick. > >Thanks, >Vijaya > >-Original Message- >From: fea jabi [mailto:[EMAIL PROTECTED] >Sent: Friday, May 26, 2006 11:03 AM >To: user@struts.apache.org >Subject: RE: validation with validwhen > >Thankyou for the response. > >tried >(*this* >= 0) > >but still not getting error message. any other suggessions? > > > >From: "Chaudhary, Harsh" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: "Struts Users Mailing List" > >Subject: RE: validation with validwhen > >Date: Fri, 26 May 2006 09:46:37 -0500 > > > >Instead of this: > > > > (*this* >= 0) > > > >Use this: > > > > (*this* >= 0) > > > >Its to do with how your '>' characters are parsed. > > > >Harsh. > > > >-Original Message- > >From: fea jabi [mailto:[EMAIL PROTECTED] > >Sent: Friday, May 26, 2006 8:01 AM > >To: user@struts.apache.org > >Subject: RE: validation with validwhen > > > > > >can someone help me with this please? thanks. > > > > > > >From: "fea jabi" <[EMAIL PROTECTED]> > > >Reply-To: "Struts Users Mailing List" > > >To: user@struts.apache.org > > >Subject: validation with validwhen > > >Date: Thu, 25 May 2006 12:31:56 -0400 > > > > > >want to validate a property for > > > > > >required, > > >and also make sure it's value is greater than Zero. The value should > > >be > >a > > >positive double. > > > > > >tried the below > > > > > > > > > > > > > > >test > > >(*this* >= 0) > > > > > > > > > > > >when nothing is entered by the user, getting the required message. > > >When > > > > >entered the characters not getting th
RE: validation with validwhen
"and getting the error when used double." Could you explain that? Like what exactly do you input when you get the error and what you input when you do not get an error. I just found recently that struts has a bug e.g. I have a field similar to yours which is a float and has float and floatRange validations. It has to be > 0. It catches the error when I input 0 because it has to be greater than 0. But when I input 0.0, I don't get an error. Maybe yours is a similar situation. Harsh. -Original Message- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Friday, May 26, 2006 11:51 AM To: user@struts.apache.org Subject: RE: validation with validwhen no, it's not a dumb question. But yah, I do have the key right!! and getting the error when used double. Using 1.2.7 version of struts. Actually I did try >(*this* > 0) too but, this didn't work either. I tried, the below too min0 maxDouble.MAX_VALUE double range from above, is not working right!! whatever number I give it's gives error. any other suggessions? Thanks. >From: "Chaudhary, Harsh" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: "Struts Users Mailing List" >Subject: RE: validation with validwhen >Date: Fri, 26 May 2006 10:20:01 -0500 > >Fea, >What version of struts are you using? Dumb question, but are you sure >the key "lbl.notvalidnumber" is spelled right in your error messages >properties file. > >Harsh. > >-Original Message- >From: Krishnan, Vijaya [mailto:[EMAIL PROTECTED] >Sent: Friday, May 26, 2006 10:07 AM >To: Struts Users Mailing List >Subject: RE: validation with validwhen > > > and also make sure it's value is greater than Zero. > >Do you need >= or > than 0? >(*this* > 0) might do the trick. > >Thanks, >Vijaya > >-Original Message- >From: fea jabi [mailto:[EMAIL PROTECTED] >Sent: Friday, May 26, 2006 11:03 AM >To: user@struts.apache.org >Subject: RE: validation with validwhen > >Thankyou for the response. > >tried >(*this* >= 0) > >but still not getting error message. any other suggessions? > > > >From: "Chaudhary, Harsh" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: "Struts Users Mailing List" > >Subject: RE: validation with validwhen > >Date: Fri, 26 May 2006 09:46:37 -0500 > > > >Instead of this: > > > > (*this* >= 0) > > > >Use this: > > > > (*this* >= 0) > > > >Its to do with how your '>' characters are parsed. > > > >Harsh. > > > >-Original Message- > >From: fea jabi [mailto:[EMAIL PROTECTED] > >Sent: Friday, May 26, 2006 8:01 AM > >To: user@struts.apache.org > >Subject: RE: validation with validwhen > > > > > >can someone help me with this please? thanks. > > > > > > >From: "fea jabi" <[EMAIL PROTECTED]> > > >Reply-To: "Struts Users Mailing List" > > >To: user@struts.apache.org > > >Subject: validation with validwhen > > >Date: Thu, 25 May 2006 12:31:56 -0400 > > > > > >want to validate a property for > > > > > >required, > > >and also make sure it's value is greater than Zero. The value should > > >be > >a > > >positive double. > > > > > >tried the below > > > > > > > > > > > > > > >test > > >(*this* >= 0) > > > > > > > > > > > >when nothing is entered by the user, getting the required message. > > >When > > > > >entered the characters not getting the message of validwhen. > > > > > >what am I missing? > > > > > >Thanks. > > > > > >_ > > >Don't just search. Find. Check out the new MSN Search! > > >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > > > > > > > >- > > >To unsubscribe, e-mail: [EMAIL PROTECTED] > > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > >_ > >Don't just search. Find. Check out the new MSN Search! &g
RE: validation with validwhen
no, it's not a dumb question. But yah, I do have the key right!! and getting the error when used double. Using 1.2.7 version of struts. Actually I did try (*this* > 0) too but, this didn't work either. I tried, the below too min0 maxDouble.MAX_VALUE double range from above, is not working right!! whatever number I give it's gives error. any other suggessions? Thanks. From: "Chaudhary, Harsh" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: "Struts Users Mailing List" Subject: RE: validation with validwhen Date: Fri, 26 May 2006 10:20:01 -0500 Fea, What version of struts are you using? Dumb question, but are you sure the key "lbl.notvalidnumber" is spelled right in your error messages properties file. Harsh. -Original Message- From: Krishnan, Vijaya [mailto:[EMAIL PROTECTED] Sent: Friday, May 26, 2006 10:07 AM To: Struts Users Mailing List Subject: RE: validation with validwhen and also make sure it's value is greater than Zero. Do you need >= or > than 0? (*this* > 0) might do the trick. Thanks, Vijaya -Original Message- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Friday, May 26, 2006 11:03 AM To: user@struts.apache.org Subject: RE: validation with validwhen Thankyou for the response. tried (*this* >= 0) but still not getting error message. any other suggessions? >From: "Chaudhary, Harsh" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: "Struts Users Mailing List" >Subject: RE: validation with validwhen >Date: Fri, 26 May 2006 09:46:37 -0500 > >Instead of this: > > (*this* >= 0) > >Use this: > > (*this* >= 0) > >Its to do with how your '>' characters are parsed. > >Harsh. > >-Original Message- >From: fea jabi [mailto:[EMAIL PROTECTED] >Sent: Friday, May 26, 2006 8:01 AM >To: user@struts.apache.org >Subject: RE: validation with validwhen > > >can someone help me with this please? thanks. > > > >From: "fea jabi" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: user@struts.apache.org > >Subject: validation with validwhen > >Date: Thu, 25 May 2006 12:31:56 -0400 > > > >want to validate a property for > > > >required, > >and also make sure it's value is greater than Zero. The value should > >be >a > >positive double. > > > >tried the below > > > > > > > > > >test > >(*this* >= 0) > > > > > > > >when nothing is entered by the user, getting the required message. > >When > > >entered the characters not getting the message of validwhen. > > > >what am I missing? > > > >Thanks. > > > >_ > >Don't just search. Find. Check out the new MSN Search! > >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > >_ >Don't just search. Find. Check out the new MSN Search! >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > >- >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] > _ Is your PC infected? Get a FREE online computer virus scan from McAfee(r) Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - 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] _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validation with validwhen
Fea, What version of struts are you using? Dumb question, but are you sure the key "lbl.notvalidnumber" is spelled right in your error messages properties file. Harsh. -Original Message- From: Krishnan, Vijaya [mailto:[EMAIL PROTECTED] Sent: Friday, May 26, 2006 10:07 AM To: Struts Users Mailing List Subject: RE: validation with validwhen and also make sure it's value is greater than Zero. Do you need >= or > than 0? (*this* > 0) might do the trick. Thanks, Vijaya -Original Message- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Friday, May 26, 2006 11:03 AM To: user@struts.apache.org Subject: RE: validation with validwhen Thankyou for the response. tried (*this* >= 0) but still not getting error message. any other suggessions? >From: "Chaudhary, Harsh" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: "Struts Users Mailing List" >Subject: RE: validation with validwhen >Date: Fri, 26 May 2006 09:46:37 -0500 > >Instead of this: > > (*this* >= 0) > >Use this: > > (*this* >= 0) > >Its to do with how your '>' characters are parsed. > >Harsh. > >-Original Message----- >From: fea jabi [mailto:[EMAIL PROTECTED] >Sent: Friday, May 26, 2006 8:01 AM >To: user@struts.apache.org >Subject: RE: validation with validwhen > > >can someone help me with this please? thanks. > > > >From: "fea jabi" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: user@struts.apache.org > >Subject: validation with validwhen > >Date: Thu, 25 May 2006 12:31:56 -0400 > > > >want to validate a property for > > > >required, > >and also make sure it's value is greater than Zero. The value should > >be >a > >positive double. > > > >tried the below > > > > > > > > > >test > >(*this* >= 0) > > > > > > > >when nothing is entered by the user, getting the required message. > >When > > >entered the characters not getting the message of validwhen. > > > >what am I missing? > > > >Thanks. > > > >_ > >Don't just search. Find. Check out the new MSN Search! > >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > >_ >Don't just search. Find. Check out the new MSN Search! >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > >- >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] > _ Is your PC infected? Get a FREE online computer virus scan from McAfee(r) Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - 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 with validwhen
and also make sure it's value is greater than Zero. Do you need >= or > than 0? (*this* > 0) might do the trick. Thanks, Vijaya -Original Message- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Friday, May 26, 2006 11:03 AM To: user@struts.apache.org Subject: RE: validation with validwhen Thankyou for the response. tried (*this* >= 0) but still not getting error message. any other suggessions? >From: "Chaudhary, Harsh" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: "Struts Users Mailing List" >Subject: RE: validation with validwhen >Date: Fri, 26 May 2006 09:46:37 -0500 > >Instead of this: > > (*this* >= 0) > >Use this: > > (*this* >= 0) > >Its to do with how your '>' characters are parsed. > >Harsh. > >-Original Message- >From: fea jabi [mailto:[EMAIL PROTECTED] >Sent: Friday, May 26, 2006 8:01 AM >To: user@struts.apache.org >Subject: RE: validation with validwhen > > >can someone help me with this please? thanks. > > > >From: "fea jabi" <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" > >To: user@struts.apache.org > >Subject: validation with validwhen > >Date: Thu, 25 May 2006 12:31:56 -0400 > > > >want to validate a property for > > > >required, > >and also make sure it's value is greater than Zero. The value should > >be >a > >positive double. > > > >tried the below > > > > > > > > > >test > >(*this* >= 0) > > > > > > > >when nothing is entered by the user, getting the required message. > >When > > >entered the characters not getting the message of validwhen. > > > >what am I missing? > > > >Thanks. > > > >_ > >Don't just search. Find. Check out the new MSN Search! > >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > > > > >- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > >_ >Don't just search. Find. Check out the new MSN Search! >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > >- >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] > _ Is your PC infected? Get a FREE online computer virus scan from McAfee(r) Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - 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 with validwhen
Thankyou for the response. tried (*this* >= 0) but still not getting error message. any other suggessions? From: "Chaudhary, Harsh" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: "Struts Users Mailing List" Subject: RE: validation with validwhen Date: Fri, 26 May 2006 09:46:37 -0500 Instead of this: (*this* >= 0) Use this: (*this* >= 0) Its to do with how your '>' characters are parsed. Harsh. -Original Message- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Friday, May 26, 2006 8:01 AM To: user@struts.apache.org Subject: RE: validation with validwhen can someone help me with this please? thanks. >From: "fea jabi" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: user@struts.apache.org >Subject: validation with validwhen >Date: Thu, 25 May 2006 12:31:56 -0400 > >want to validate a property for > >required, >and also make sure it's value is greater than Zero. The value should be a >positive double. > >tried the below > > > > >test >(*this* >= 0) > > > >when nothing is entered by the user, getting the required message. When >entered the characters not getting the message of validwhen. > >what am I missing? > >Thanks. > >_ >Don't just search. Find. Check out the new MSN Search! >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > _ Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - 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] _ Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validation with validwhen
Instead of this: (*this* >= 0) Use this: (*this* >= 0) Its to do with how your '>' characters are parsed. Harsh. -Original Message- From: fea jabi [mailto:[EMAIL PROTECTED] Sent: Friday, May 26, 2006 8:01 AM To: user@struts.apache.org Subject: RE: validation with validwhen can someone help me with this please? thanks. >From: "fea jabi" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: user@struts.apache.org >Subject: validation with validwhen >Date: Thu, 25 May 2006 12:31:56 -0400 > >want to validate a property for > >required, >and also make sure it's value is greater than Zero. The value should be a >positive double. > >tried the below > > > > >test >(*this* >= 0) > > > >when nothing is entered by the user, getting the required message. When >entered the characters not getting the message of validwhen. > >what am I missing? > >Thanks. > >_ >Don't just search. Find. Check out the new MSN Search! >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > _ Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - 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 with validwhen
Hi, from http://struts.apache.org/struts-doc-1.2.9/userGuide/dev_validator.html we learn that: If both items to be compared are convertable to ints, a numeric comparison is done, otherwise a string comparison is done. so since about any string is >= you will almost always get a valid check. I think you want to use the doubleRange validator on the range 0.0 - Double.MAX_VALUE (allthough I don't know if you can say that in validation.xml, other wise just choose an unbelievably high number). Or else, do what your are doing, but add a double validator (which you need for doubleRange anyway). That is probably a slightly better solution, but I don't know what happens with input like 1.2234534534. Is it an int or a string? mvg, Jasper On 5/26/06, fea jabi <[EMAIL PROTECTED]> wrote: can someone help me with this please? thanks. >From: "fea jabi" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" >To: user@struts.apache.org >Subject: validation with validwhen >Date: Thu, 25 May 2006 12:31:56 -0400 > >want to validate a property for > >required, >and also make sure it's value is greater than Zero. The value should be a >positive double. > >tried the below > > > > >test >(*this* >= 0) > > > >when nothing is entered by the user, getting the required message. When >entered the characters not getting the message of validwhen. > >what am I missing? > >Thanks. > >_ >Don't just search. Find. Check out the new MSN Search! >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > _ Don't just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - 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 with validwhen
can someone help me with this please? thanks. From: "fea jabi" <[EMAIL PROTECTED]> Reply-To: "Struts Users Mailing List" To: user@struts.apache.org Subject: validation with validwhen Date: Thu, 25 May 2006 12:31:56 -0400 want to validate a property for required, and also make sure it's value is greater than Zero. The value should be a positive double. tried the below test (*this* >= 0) when nothing is entered by the user, getting the required message. When entered the characters not getting the message of validwhen. what am I missing? Thanks. _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validation with validwhen
want to validate a property for required, and also make sure it's value is greater than Zero. The value should be a positive double. tried the below test (*this* >= 0) when nothing is entered by the user, getting the required message. When entered the characters not getting the message of validwhen. what am I missing? Thanks. _ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Complex Validation with validwhen and large condition
Thanks Niall, that took care of it. We just had to convert the ANDs and ORs to lower case to conform to the grammer. Todd On Fri, 25 Feb 2005 20:14:54 -, Niall Pemberton <[EMAIL PROTECTED]> wrote: > The condition you have specified means that addressLine1 is only valid when > everything is not null. Thats why you always get the error - you need an OR > condition. In order to get appropriate "required" messages for the various > fields, how about something along the following lines > > > test > ( (this != null) OR ( > (addressLine2 == null) AND > ((city == null) AND > ((state == null) AND > ((zip == null) AND > ((zip4 == null) AND > (country == null)) > > > > > test > ((this != null) OR (addressLine1 == null)) > > > > test > ((this != null) OR (addressLine1 == null)) > > > > test > ((this != null) OR (addressLine1 == null)) > > > > test > ((this != null) OR (addressLine1 == null)) > > > > Niall > > - Original Message ----- > From: "Todd Nine" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Sent: Friday, February 25, 2005 7:21 PM > Subject: Complex Validation with validwhen and large condition > > > Hi all, > >I'm having some issues getting validwhen to perform the way I want > > it to. I would like the following general functionality. > > > > 1. The user can input an aseAddress. > > 2. The address as a whole is nullable, however if they fill in any of > > the fields, they must filling ALL of the address fields. > > > > Here are my properties > > > > aseAddress.addressLine1 > > aseAddress.addressLine2 > > aseAddress.city > > aseAddress.state > > aseAddress.zip > > aseAddress.zip4 > > aseAddress.country > > > > > > addressLine2 and zip4 are not required. However, if any field in the > > list above contains data, then all of the fields except for > > addressLine2 and zip4 are required. > > > > Here is an example contition I have tried, but I contantly get that > > the fields are required, even when they are all empty. If anyone who > > has a better way, please let me know. > > > > > > > > > > > > > > mask > > ${allvalid} > > > > > > test > > > > ( > > ( > > ( > > ( > > ( > > ( > > (*this* != null) > > and (aseAddress.addressLine2 != null) > > ) and (aseAddress.city != null) > > ) and (aseAddress.state != null) > > ) and (aseAddress.postalCode4 != null) > > ) and (aseAddress.country != null) > > ) and (aseAddress.postalCode != null) > > ) > > > > > > > > - > 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: Complex Validation with validwhen and large condition
The condition you have specified means that addressLine1 is only valid when everything is not null. Thats why you always get the error - you need an OR condition. In order to get appropriate "required" messages for the various fields, how about something along the following lines test ( (this != null) OR ( (addressLine2 == null) AND ((city == null) AND ((state == null) AND ((zip == null) AND ((zip4 == null) AND (country == null)) test ((this != null) OR (addressLine1 == null)) test ((this != null) OR (addressLine1 == null)) test ((this != null) OR (addressLine1 == null)) test ((this != null) OR (addressLine1 == null)) Niall - Original Message - From: "Todd Nine" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Friday, February 25, 2005 7:21 PM Subject: Complex Validation with validwhen and large condition > Hi all, >I'm having some issues getting validwhen to perform the way I want > it to. I would like the following general functionality. > > 1. The user can input an aseAddress. > 2. The address as a whole is nullable, however if they fill in any of > the fields, they must filling ALL of the address fields. > > Here are my properties > > aseAddress.addressLine1 > aseAddress.addressLine2 > aseAddress.city > aseAddress.state > aseAddress.zip > aseAddress.zip4 > aseAddress.country > > > addressLine2 and zip4 are not required. However, if any field in the > list above contains data, then all of the fields except for > addressLine2 and zip4 are required. > > Here is an example contition I have tried, but I contantly get that > the fields are required, even when they are all empty. If anyone who > has a better way, please let me know. > > > > > > > mask > ${allvalid} > > > test > > ( > ( > ( > ( > ( > ( > (*this* != null) > and (aseAddress.addressLine2 != null) > ) and (aseAddress.city != null) > ) and (aseAddress.state != null) > ) and (aseAddress.postalCode4 != null) > ) and (aseAddress.country != null) > ) and (aseAddress.postalCode != null) > ) > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Complex Validation with validwhen and large condition
Hi all, I'm having some issues getting validwhen to perform the way I want it to. I would like the following general functionality. 1. The user can input an aseAddress. 2. The address as a whole is nullable, however if they fill in any of the fields, they must filling ALL of the address fields. Here are my properties aseAddress.addressLine1 aseAddress.addressLine2 aseAddress.city aseAddress.state aseAddress.zip aseAddress.zip4 aseAddress.country addressLine2 and zip4 are not required. However, if any field in the list above contains data, then all of the fields except for addressLine2 and zip4 are required. Here is an example contition I have tried, but I contantly get that the fields are required, even when they are all empty. If anyone who has a better way, please let me know. mask ${allvalid} test ( ( ( ( ( ( (*this* != null) and (aseAddress.addressLine2 != null) ) and (aseAddress.city != null) ) and (aseAddress.state != null) ) and (aseAddress.postalCode4 != null) ) and (aseAddress.country != null) ) and (aseAddress.postalCode != null) ) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]