validwhen (please help)
Hi all, I have followed the example in struts documentation (validwhen validaton section). I have an email address field that needs to be validated when one other field's value is set to true. But I can't get it to work at all. This is the example I cut and paste from struts web site. I am getting the following exception. See below. Any idea? Here is my version: field property=emailAddress depends=validwhen arg0 key=userinfo.emailAddress.label/ var var-nametest/var-name var-value((someFiled != 'some_value') or (*this* != null))/var-value /var /field As an example of how this would work, consider a form with fields sendNewsletter and emailAddress. The emailAddress field is only required if the sendNewsletter field is not null. You could code this using the validwhen rule as: field property=emailAddress depends=validwhen arg0 key=userinfo.emailAddress.label/ var var-nametest/var-name var-value((sendNewsletter == null) or (*this* != null))/var-value /var /field 14:22:36,603 ERROR [STDERR] line 1:23: expecting ''', found '_' 14:22:36,603 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWhenLexer.nextToken(ValidWhenLexe r.java:228) 14:22:36,603 ERROR [STDERR] at antlr.TokenBuffer.fill(TokenBuffer.java:69) 14:22:36,603 ERROR [STDERR] at antlr.TokenBuffer.LA(TokenBuffer.java:80) 14:22:36,603 ERROR [STDERR] at antlr.LLkParser.LA(LLkParser.java:52) 14:22:36,603 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWhenParser.value(ValidWhenParser. java:380) 14:22:36,603 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWhenParser.comparisonExpression(V alidWhenParser.java:434) 14:22:36,603 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWhenParser.expr(ValidWhenParser.j ava:415) 14:22:36,603 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWhenParser.joinedExpression(Valid WhenParser.java:446) 14:22:36,603 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWhenParser.expr(ValidWhenParser.j ava:420) 14:22:36,603 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWhenParser.expression(ValidWhenPa rser.java:406) 14:22:36,603 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWhen.validateValidWhen(ValidWhen. java:155) 14:22:36,603 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor155.invoke(Unknown Source) 14:22:36,603 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) 14:22:36,603 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 14:22:36,603 ERROR [STDERR] at org.apache.commons.validator.ValidatorAction.executeValidationMethod(Validat orAction.java:610) 14:22:36,603 ERROR [STDERR] at org.apache.commons.validator.Field.validateForRule(Field.java:848) 14:22:36,603 ERROR [STDERR] at org.apache.commons.validator.Field.validate(Field.java:927) 14:22:36,603 ERROR [STDERR] at org.apache.commons.validator.Form.validate(Form.java:211) 14:22:36,603 ERROR [STDERR] at org.apache.commons.validator.Validator.validate(Validator.java:407) 14:22:36,603 ERROR [STDERR] at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:151) 14:22:36,603 ERROR [STDERR] at com.adobe.edc.server.presentation.fw.EDCActionForm.validate(EDCActionForm.ja va:96) 14:22:36,603 ERROR [STDERR] at com.adobe.edc.server.presentation.policy.AssignPermissionAction.addExternal_ onClick(AssignPermissionAction.java:200) 14:22:36,603 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 14:22:36,603 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) 14:22:36,603 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) 14:22:36,603 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 14:22:36,603 ERROR [STDERR] at com.cc.framework.adapter.struts.FWAction.handleFormAction(Unknown Source) 14:22:36,603 ERROR [STDERR] at com.cc.framework.adapter.struts.FWAction.execute(Unknown Source) 14:22:36,603 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces sor.java:462) 14:22:36,603 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:267) 14:22:36,603 ERROR [STDERR] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1187) 14:22:36,603 ERROR [STDERR] at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:451) 14:22:36,603 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) 14:22:36,603 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 14:22:36,603 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) 14
Map-backed ActionForms, validating using validWhen
I have a form that I'm using map-backed properties with. There is nothing all that unusual about it, but I'm trying to do validation using the validWhen built-in validation. I can't seem to figure out if I can access a map-backed property in the conditional statement for the validWhen validation. My validation.xml looks like such: form name=circuitBreakerEditForm field property=value(marketCategoryId) depends=required arg0 key=label.marketCategoryId/ /field field property=value(shortDescription) depends=required arg0 key=label.shortDescription/ /field field property=value(percentIncrease) depends=validwhen arg0 key=label.percentIncrease/ var var-nametest/var-name var-value((*this* != null) or (value(percentDecline) != null))/var-value /var /field /form The first two for marketCategoryId and shortDescription work fine, but when I add the 3rd it gives me an error unexpected token: value. Does anyone know how to access a map-backed property in this conditional part of the validWhen validation? Thanks for any help Mark __ Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time. http://taxes.yahoo.com/filing.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validwhen validation question
Is it possisble to use validwhen for date fields like comparing dates? Brendan Richards [EMAIL PROTECTED] wrote: I'm looking at using validwhen for a complex validation. I've got a value that can either be ignored when another parameter is set or is valid when it's a date. A simple date validation would be something like this: datePatterndd-MM-var Can a validwhen call another validation? Giving you something like test ((ignoreDate == yes) or ( #insert date validation# )) or should I just write my own validation rule / do it with javascript before I submit? Thanks, Brendan Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time.
validwhen validation question
I'm looking at using validwhen for a complex validation. I've got a value that can either be ignored when another parameter is set or is valid when it's a date. A simple date validation would be something like this: field property=date depends=required,date arg0 key=myForm.date/ varvar-namedatePattern/var-namevar-valuedd-MM-/var-value/ var /field Can a validwhen call another validation? Giving you something like field property=date depends=validwhen arg0 key=myform.date/ var var-nametest/var-name var-value((ignoreDate == yes) or ( #insert date validation# ))/var-value /var /field or should I just write my own validation rule / do it with javascript before I submit? Thanks, Brendan
RE: validator validwhen error (Repost)
Anyone has any idea? I haven't seen anyone's reply. Thanks. -Betty -Original Message- From: Betty Koon [mailto:[EMAIL PROTECTED] Sent: Monday, March 08, 2004 8:07 PM To: [EMAIL PROTECTED] Subject: validator validwhen error Hi, I got the following validator error, but not sure why. here is my validator.xml and the exception: formset form name=someForm field property=email depends=validwhen,email arg0 key=email.error_label/ var var-nametest/var-name var-value((actionType != 'x') or (*this* != null))/var-value /var /field field property=startDate depends=validwhen,date arg0 key=start_date.error_label/ var var-nametest/var-name var-value((editAction != 'false') or (*this* != null))/var-value /var var var-namedatePatternStrict/var-name var-valueMM/dd/ HH:mm:ss/var-value /var /field /form /formset * 59:03,863 ERROR [STDERR] line 1:23: expecting ''', found '_' 59:03,863 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh exer.nextToken(ValidWhenLexer.java:228) 19:58:59,637 ERROR [STDERR] at antlr.TokenBuffer.fill(TokenBuffer.java:69) 19:58:59,637 ERROR [STDERR] at antlr.TokenBuffer.LA(TokenBuffer.java:80) 19:58:59,637 ERROR [STDERR] at antlr.LLkParser.LA(LLkParser.java:52) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh enParser.value(ValidWhenParser.java:380) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh enParser.comparisonExpression(ValidWhenParser.java:434) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh enParser.expr(ValidWhenParser.java:415) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh enParser.joinedExpression(ValidWhenParser.java:446) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh enParser.expr(ValidWhenParser.java:420) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh enParser.expression(ValidWhenParser.java:406) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh en.validateValidWhen(ValidWhen.java:155) 19:58:59,637 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor126.invoke (Unknown Source) 19:58:59,637 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo ke(DelegatingMethodAccessorImpl.java:25) 19:58:59,637 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:3 24) 19:58:59,637 ERROR [STDERR] at org.apache.commons.validator.ValidatorAction. executeValidationMethod(ValidatorAction.java:610) 19:58:59,637 ERROR [STDERR] at org.apache.commons.validator.Field.validateFo rRule(Field.java:848) 19:58:59,637 ERROR [STDERR] at org.apache.commons.validator.Field.validate(F ield.java:927) 19:58:59,637 ERROR [STDERR] at org.apache.commons.validator.Form.validate(Fo rm.java:211) 19:58:59,637 ERROR [STDERR] at org.apache.commons.validator.Validator.valida te(Validator.java:407) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.ValidatorForm.val idate(ValidatorForm.java:151) 19:58:59,637 ERROR [STDERR] at com.adobe.edc.server.presentation.fw.EDCActio nForm.validate(EDCActionForm.java:96) 19:58:59,637 ERROR [STDERR] at com.adobe.edc.server.presentation.policy.Assi gnPermissionAction.addAnonymous_onClick(AssignPermissionAction.java:252) 19:58:59,637 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0( Native Method) 19:58:59,637 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(N ativeMethodAccessorImpl.java:39) 19:58:59,637 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo ke(DelegatingMethodAccessorImpl.java:25) 19:58:59,637 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:3 24) 19:58:59,637 ERROR [STDERR] at com.cc.framework.adapter.struts.FWAction.hand leFormAction(Unknown Source) 19:58:59,637 ERROR [STDERR] at com.cc.framework.adapter.struts.FWAction.exec ute(Unknown Source) 19:58:59,637 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.pro cessActionPerform(RequestProcessor.java:462) 19:58:59,637 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.pro cess(RequestProcessor.java:267) 19:58:59,637 ERROR [STDERR] at org.apache.struts.action.ActionServlet.proces s(ActionServlet.java:1187) 19:58:59,637 ERROR [STDERR] at org.apache.struts.action.ActionServlet.doPost (ActionServlet.java:451) 19:58:59,637 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpSe rvlet.java:760) 19:58:59,637 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpSe rvlet.java:853) 19:58:59,637 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha in.internalDoFilter
validator validwhen error
Hi, I got the following validator error, but not sure why. here is my validator.xml and the exception: formset form name=someForm field property=email depends=validwhen,email arg0 key=email.error_label/ var var-nametest/var-name var-value((actionType != 'x') or (*this* != null))/var-value /var /field field property=startDate depends=validwhen,date arg0 key=start_date.error_label/ var var-nametest/var-name var-value((editAction != 'false') or (*this* != null))/var-value /var var var-namedatePatternStrict/var-name var-valueMM/dd/ HH:mm:ss/var-value /var /field /form /formset * 59:03,863 ERROR [STDERR] line 1:23: expecting ''', found '_' 59:03,863 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh exer.nextToken(ValidWhenLexer.java:228) 19:58:59,637 ERROR [STDERR] at antlr.TokenBuffer.fill(TokenBuffer.java:69) 19:58:59,637 ERROR [STDERR] at antlr.TokenBuffer.LA(TokenBuffer.java:80) 19:58:59,637 ERROR [STDERR] at antlr.LLkParser.LA(LLkParser.java:52) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh enParser.value(ValidWhenParser.java:380) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh enParser.comparisonExpression(ValidWhenParser.java:434) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh enParser.expr(ValidWhenParser.java:415) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh enParser.joinedExpression(ValidWhenParser.java:446) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh enParser.expr(ValidWhenParser.java:420) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh enParser.expression(ValidWhenParser.java:406) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWh en.validateValidWhen(ValidWhen.java:155) 19:58:59,637 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor126.invoke (Unknown Source) 19:58:59,637 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo ke(DelegatingMethodAccessorImpl.java:25) 19:58:59,637 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:3 24) 19:58:59,637 ERROR [STDERR] at org.apache.commons.validator.ValidatorAction. executeValidationMethod(ValidatorAction.java:610) 19:58:59,637 ERROR [STDERR] at org.apache.commons.validator.Field.validateFo rRule(Field.java:848) 19:58:59,637 ERROR [STDERR] at org.apache.commons.validator.Field.validate(F ield.java:927) 19:58:59,637 ERROR [STDERR] at org.apache.commons.validator.Form.validate(Fo rm.java:211) 19:58:59,637 ERROR [STDERR] at org.apache.commons.validator.Validator.valida te(Validator.java:407) 19:58:59,637 ERROR [STDERR] at org.apache.struts.validator.ValidatorForm.val idate(ValidatorForm.java:151) 19:58:59,637 ERROR [STDERR] at com.adobe.edc.server.presentation.fw.EDCActio nForm.validate(EDCActionForm.java:96) 19:58:59,637 ERROR [STDERR] at com.adobe.edc.server.presentation.policy.Assi gnPermissionAction.addAnonymous_onClick(AssignPermissionAction.java:252) 19:58:59,637 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0( Native Method) 19:58:59,637 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(N ativeMethodAccessorImpl.java:39) 19:58:59,637 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invo ke(DelegatingMethodAccessorImpl.java:25) 19:58:59,637 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:3 24) 19:58:59,637 ERROR [STDERR] at com.cc.framework.adapter.struts.FWAction.hand leFormAction(Unknown Source) 19:58:59,637 ERROR [STDERR] at com.cc.framework.adapter.struts.FWAction.exec ute(Unknown Source) 19:58:59,637 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.pro cessActionPerform(RequestProcessor.java:462) 19:58:59,637 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.pro cess(RequestProcessor.java:267) 19:58:59,637 ERROR [STDERR] at org.apache.struts.action.ActionServlet.proces s(ActionServlet.java:1187) 19:58:59,637 ERROR [STDERR] at org.apache.struts.action.ActionServlet.doPost (ActionServlet.java:451) 19:58:59,637 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpSe rvlet.java:760) 19:58:59,637 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpSe rvlet.java:853) 19:58:59,637 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha in.internalDoFilter(ApplicationFilterChain.java:247) 19:58:59,637 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterCha in.doFilter(ApplicationFilterChain.java:193) 19:58:59,637 ERROR [STDERR] at com.adobe.edc.server.presentation.auth.Authen ticationFilter.doFilter
Perform date validation only if field required (requiredIf/validWhen)
Hi, I have three radio buttons in a form, --- o Today o Tomorrow o From this date: [ ] --- I am currently using requiredIf and date validation on the date textarea . The date entry is only required if the correct radio button is selected and the date validation makes sure this is in the right format. This works fine, until the user enters an invalid date that doesn't pass date validation and *then* select's one of the other radio buttons, and submits. The requiredIf passes fine (not required), but the date validation is still perfomed and returns the page to the user. Is it possible to perform date validation only if requiredif decides the fields are required? That is, don't test things that aren't required, without: * extra javascript in the page * without using custom validation java-code (the rest of the form's validation works great) I have looked at validWhen (and am not aversed to going to the nightly-build), but can't see the solution there either. Any help would be appreciated, Ivan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validwhen
The validwhen documentation suggests that only two items may be joined with and or or. Does this mean that I could not write a condition like: var-nametest/var-name var-value((field1 == 'A') or (field1 == 'B') or (field1 == 'C'))/var-value Is it this limited? Anyone having successful experience of not trivial validations using validwhen? Ai sensi del D.Lgs.196/2003 si precisa che le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il messaggio in parola Le fosse pervenuto per errore, La invitiamo ad eliminarlo senza copiarlo e a non inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.BRBRPursuant to Legislative Decree No. 196/2003, you are hereby informed that this message contains confidential information intended only for the use of the addressee. If you are not the addressee, and have received this message by mistake, please delete it and immediately notify us. You may not copy or disseminate this message to anyone. Thank you.
validwhen - solved (more or less)
I did what I wanted, but had to code it like this: var-nametest/var-name var-value((field1 == 'A') or ((field1 == 'B') or (field1 == 'C')))/var-value rather difficult to read! Regards, Fabio. -Messaggio originale- Da: Grassi Fabio Inviato: giovedì 19 febbraio 2004 17:43 A: '[EMAIL PROTECTED]' Oggetto: validwhen The validwhen documentation suggests that only two items may be joined with and or or. Does this mean that I could not write a condition like: var-nametest/var-name var-value((field1 == 'A') or (field1 == 'B') or (field1 == 'C'))/var-value Is it this limited? Anyone having successful experience of not trivial validations using validwhen? Ai sensi del D.Lgs.196/2003 si precisa che le informazioni contenute in questo messaggio sono riservate ed a uso esclusivo del destinatario. Qualora il messaggio in parola Le fosse pervenuto per errore, La invitiamo ad eliminarlo senza copiarlo e a non inoltrarlo a terzi, dandocene gentilmente comunicazione. Grazie.BRBRPursuant to Legislative Decree No. 196/2003, you are hereby informed that this message contains confidential information intended only for the use of the addressee. If you are not the addressee, and have received this message by mistake, please delete it and immediately notify us. You may not copy or disseminate this message to anyone. Thank you.
Validwhen validator question
Hi. Can I use global constants from constant element in validwhen validator? If I can, how can I do that? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validwhen validator question
Hi. I have the next question related with validwhen validator. I have the validwhen validator like var var-nametest/var-name var-value((*this* != null) or ((actionName == Action) and (*this* == null)))/var-value /var This works fine, but when I replace the Action string literal with unicode characters (cyrilic) and set xml encoding in the validation.xml to ?xml version=1.0 encoding=UTF-8 ?, I get the following error message: 2004-02-02 10:04:24,168 ERROR [STDERR] line 1:39: unexpected char: 0xzD 2004-02-02 10:04:24,168 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWhenLexer.nextToken(ValidWhenLexe r.java:236) 2004-02-02 10:04:24,168 ERROR [STDERR] at antlr.TokenBuffer.fill(TokenBuffer.java:69) 2004-02-02 10:04:24,168 ERROR [STDERR] at antlr.TokenBuffer.LA(TokenBuffer.java:80) 2004-02-02 10:04:24,168 ERROR [STDERR] at antlr.LLkParser.LA(LLkParser.java:52) 2004-02-02 10:04:24,168 ERROR [STDERR] at org.apache.struts.validator.validwhen.ValidWhenParser.value(ValidWhenParser. java:384) -Original Message- From: Andriy Ruzhevych [mailto:[EMAIL PROTECTED] Sent: Monday, February 02, 2004 9:15 AM To: Struts Users Mailing List Subject: Validwhen validator question Hi. Can I use global constants from constant element in validwhen validator? If I can, how can I do that? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ NOD32 1.611 (20040127) Information __ This message was checked by NOD32 antivirus system. http://www.nod32.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ValidWhen validator
Hi, Is there a stable Struts release after 1.1 ? If Yes, what is the version and does it have ValidWhen Validator support ? regards Deepak
validwhen
Hi, Has any one used validwhen validator rule ? when I am using it is not doing anything its making empty validate javascript methods and no validations are being called . Thanks in advance. cheers, Sumeet
RE: validwhen
As I understood, validwhen is only on server side. there will not be any javascript validations. -Original Message- From: sumeet sharma [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2003 1:08 PM To: [EMAIL PROTECTED] Subject: validwhen Hi, Has any one used validwhen validator rule ? when I am using it is not doing anything its making empty validate javascript methods and no validations are being called . Thanks in advance. cheers, Sumeet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: RE: validwhen
Yes it is for server side only. But if I can define a CDATA and call a method to perform javascript validation cant I do that ?? As there is no way I can validate a nested indexed property on the clientside and server side same time . No then I will end up writting javascript in .js files .. Which I am trying to avoid for bussiness logic . Thanx cheers, Sumeet On Thu, 13 Nov 2003 Vara Prasad Reddy wrote : As I understood, validwhen is only on server side. there will not be any javascript validations. -Original Message- From: sumeet sharma [mailto:[EMAIL PROTECTED] Sent: Thursday, November 13, 2003 1:08 PM To: [EMAIL PROTECTED] Subject: validwhen Hi, Has any one used validwhen validator rule ? when I am using it is not doing anything its making empty validate javascript methods and no validations are being called . Thanks in advance. cheers, Sumeet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validwhen + struts 1.1
I am currently using struts 1.1. Is there a way I can use the "validwhen" functionality of future coming struts 1.2. Something like I can take only the class files of validwhen and use it along with struts 1.1 can someone detail me on this? Thanks in advance Vara Prasad
RE: validwhen + struts 1.1
Blankvalidwhen is in CVS right now. Check out nightly build if it's worth it to you. -Original Message- From: Vara Prasad Reddy [mailto:[EMAIL PROTECTED] Sent: Thursday, November 06, 2003 5:32 AM To: struts Subject: validwhen + struts 1.1 Importance: High I am currently using struts 1.1. Is there a way I can use the validwhen functionality of future coming struts 1.2. Something like I can take only the class files of validwhen and use it along with struts 1.1 can someone detail me on this? Thanks in advance Vara Prasad
validwhen kills me!
Hello.I've got a problem with validwhen. I've got a form with two buttons.one makes and insert in the database, and the other makes a searchI want to make a validation only when the insert button is pushed and i don't know if i understand correctly how validwhen works. I've got this form html:form action=/icytReviAction onsubmit=return validateIcytReviForm(this) html:text property=name/ html:text property=email/ html:hidden property=act/ html:submit value=alta onclick=javascript:document.forms[0].act.value='insert';/ html:submit value=alta onclick=javascript:document.forms[0].act.value='search';/ /html:form The hidden input called act that is filled with the word search or insert, the value depends of the button you push. I want to set name as a required field and email has a required, email mask field. If i put this validation don't run :\ field property=name depends=validwhen arg0 key=icytReviForm.name.displayname/ var var-nametest/var-name var-value(act == 'alta')/var-value /var /field field property=email depends=validwhen,email arg0 key=icytReviForm.name.displayname/ msg name=email key=errors.icytReviForm.formatoCOZ/ var var-nametest/var-name var-value(act == 'alta')/var-value /var /field Some one knows how to validate correctly?? Someone use validwhen and it's validate correctly? Thanks in advance
Re: validwhen kills me!
Sorry I've got and error...change this line var-value(act == 'alta')/var-value with this var-value(act == 'insert')/var-value Thanks - Original Message - From: Ruben Orta Magan [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, October 28, 2003 2:02 PM Subject: validwhen kills me! Hello.I've got a problem with validwhen. I've got a form with two buttons.one makes and insert in the database, and the other makes a searchI want to make a validation only when the insert button is pushed and i don't know if i understand correctly how validwhen works. I've got this form html:form action=/icytReviAction onsubmit=return validateIcytReviForm(this) html:text property=name/ html:text property=email/ html:hidden property=act/ html:submit value=alta onclick=javascript:document.forms[0].act.value='insert';/ html:submit value=alta onclick=javascript:document.forms[0].act.value='search';/ /html:form The hidden input called act that is filled with the word search or insert, the value depends of the button you push. I want to set name as a required field and email has a required, email mask field. If i put this validation don't run :\ field property=name depends=validwhen arg0 key=icytReviForm.name.displayname/ var var-nametest/var-name var-value(act == 'alta')/var-value /var /field field property=email depends=validwhen,email arg0 key=icytReviForm.name.displayname/ msg name=email key=errors.icytReviForm.formatoCOZ/ var var-nametest/var-name var-value(act == 'alta')/var-value /var /field Some one knows how to validate correctly?? Someone use validwhen and it's validate correctly? Thanks in advance - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
code generate by validwhen doesn't exists
Hello again. I'm fighting with validwhen againi've got the lastest nightly build(jakarta-struts-20031027.zip) and it looks like when you use validwhen validation no javascript code is generated and inserted in the jsp file. If i use this validation definition: field property=tituloRevista depends=required arg0 key=icytReviForm.tituloRevista.displayname/ /field field property=tipoAdquisicion depends=required arg0 key=icytReviForm.tipoAdquisicion.displayname/ /field The javascript code inserted in my jsp page is: function validateIcytReviForm(form) { if (bCancel) return true; else var formValidationResult; formValidationResult = validateRequired(form); return (formValidationResult == 1); } function required () { this.aa = new Array(tituloRevista, El título es un campo obligatorio, new Function (varName, return this[varName];)); this.ab = new Array(tipoAdquisicion, El tipo de adquisición es un campo obligatorio, new Function (varName, return this[varName];)); } But if I add a new field validation in my validation.xml : field property=tituloRevista depends=required arg0 key=icytReviForm.tituloRevista.displayname/ /field field property=tipoAdquisicion depends=required arg0 key=icytReviForm.tipoAdquisicion.displayname/ /field !-- new field -- field property=tituloAbreviado depends=validwhen arg0 key=icytReviForm.tituloAbreviado.displayname/ var var-nametest/var-name var-value(tituloRevista != null)/var-value /var /field The javascript code generated is the same! function validateIcytReviForm(form) { if (bCancel) return true; else var formValidationResult; formValidationResult = validateRequired(form); return (formValidationResult == 1); } function required () { this.aa = new Array(tituloRevista, El título es un campo obligatorio, new Function (varName, return this[varName];)); this.ab = new Array(tipoAdquisicion, El tipo de adquisición es un campo obligatorio, new Function (varName, return this[varName];)); } Please someone can help me??? is the validwhen running correctly? is the problem in the definition??? Thanks...
RE: code generate by validwhen doesn't exists
I don't believe that requiredif or validwhen generate client-side (JavaScript) validation. Matt -Original Message- From: Ruben Orta Magan [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 28, 2003 10:56 AM To: Struts Users Mailing List Subject: code generate by validwhen doesn't exists Hello again. I'm fighting with validwhen againi've got the lastest nightly build(jakarta-struts-20031027.zip) and it looks like when you use validwhen validation no javascript code is generated and inserted in the jsp file. If i use this validation definition: field property=tituloRevista depends=required arg0 key=icytReviForm.tituloRevista.displayname/ /field field property=tipoAdquisicion depends=required arg0 key=icytReviForm.tipoAdquisicion.displayname/ /field The javascript code inserted in my jsp page is: function validateIcytReviForm(form) { if (bCancel) return true; else var formValidationResult; formValidationResult = validateRequired(form); return (formValidationResult == 1); } function required () { this.aa = new Array(tituloRevista, El título es un campo obligatorio, new Function (varName, return this[varName];)); this.ab = new Array(tipoAdquisicion, El tipo de adquisición es un campo obligatorio, new Function (varName, return this[varName];)); } But if I add a new field validation in my validation.xml : field property=tituloRevista depends=required arg0 key=icytReviForm.tituloRevista.displayname/ /field field property=tipoAdquisicion depends=required arg0 key=icytReviForm.tipoAdquisicion.displayname/ /field !-- new field -- field property=tituloAbreviado depends=validwhen arg0 key=icytReviForm.tituloAbreviado.displayname/ var var-nametest/var-name var-value(tituloRevista != null)/var-value /var /field The javascript code generated is the same! function validateIcytReviForm(form) { if (bCancel) return true; else var formValidationResult; formValidationResult = validateRequired(form); return (formValidationResult == 1); } function required () { this.aa = new Array(tituloRevista, El título es un campo obligatorio, new Function (varName, return this[varName];)); this.ab = new Array(tipoAdquisicion, El tipo de adquisición es un campo obligatorio, new Function (varName, return this[varName];)); } Please someone can help me??? is the validwhen running correctly? is the problem in the definition??? Thanks... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validWhen
Has validWhen been released yet?? Does anyone know? Thanks for the information, Natalie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts Validator-validwhen
Hi, The struts Validator 'validwhen' I could not find anywhere in struts,even though it was mensioned in documentation. If it is available Could anybody please help me where exactly it is available? Thanks, Shailaja -- A . S . C . A . P.-- This message, including any attachments, is intended solely for the person or entity to which it is addressed and may contain information that is legally privileged, confidential or otherwise protected from disclosure. If you are not the intended recipient, please contact sender immediately by reply email and destroy all copies. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Validator-nextreleasewhen (was validwhen)
With great trepidation, I must inquire as to the likelihood of a next release of the commons-validator in the near term future. (ducking for cover now as the flames telling me to read the Apache release process policy on the web site are fired off in my direction ;-)). Seriously, I did look in the bug database already. If my search was setup correctly, I only saw 5 open bugs against Validator (amazingly low number given that it is supposed to be crap) and they were all categorized as enhancement requests. I suspect that not too much has changed since the version that shipped with Struts 1.1. So, you may not want to push out a new release at this time. However, it is unfortunate that the ability to modularize development of larger apps with multiple struts-config files and multiple application resource files is pretty much there in the Struts 1.1 release except for mutliple resource files support in Validator. Since it looks like the support for bundle attributes was added at least at the arg level, a dot release now of just the commons-validator would make it possible to use multiple resource files to some degree with the Validator in a Struts 1.1 webapp. I'm not looking for a fixed date commitment. I realize it is all volunteer efforts on this stuff that can't be held to any particular schedule. I'll totally understand if there are no plans to move towards a dot release of Validator anytime soon, but, I am curious as to whether plans to move towards a dot release are imminent or not even on the horizon. -Van Mike Van Riper mailto:[EMAIL PROTECTED] http://www.baychi.org/bof/struts -Original Message- From: Steve Raeburn [mailto:[EMAIL PROTECTED] Sent: Thursday, August 14, 2003 8:41 AM To: Struts Users Mailing List Subject: RE: Struts Validator-validwhen It's not in Struts 1.1 but it's available in the nightly build and will be in the next release. Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: August 14, 2003 8:32 AM To: [EMAIL PROTECTED] Subject: Struts Validator-validwhen Hi, The struts Validator 'validwhen' I could not find anywhere in struts,even though it was mensioned in documentation. If it is available Could anybody please help me where exactly it is available? Thanks, Shailaja -- A . S . C . A . P.-- This message, including any attachments, is intended solely for the person or entity to which it is addressed and may contain information that is legally privileged, confidential or otherwise protected from disclosure. If you are not the intended recipient, please contact sender immediately by reply email and destroy all copies. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Validator-nextreleasewhen (was validwhen)
-Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Thursday, August 14, 2003 11:01 AM To: Struts Users Mailing List Subject: RE: Struts Validator-nextreleasewhen (was validwhen) I suspect that not too much has changed since the version that shipped with Struts 1.1. A great deal of internal cleanup has happened in commons-validator since its 1.0.2 release as well as new features and a more extensible arg definition. I think Rob Leland is planning on getting a 1.1 release out soon. David Cool! My company won't let me ship with nightly builds, but, I'd be glad to test release candidates for an upcoming release against my webapp. If the timing was right, I might even be able to include the new release in my current project before it gets deployed. That won't be happening until the November/December timeframe. Thanks, Van - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Validator-nextreleasewhen (was validwhen)
I suspect that not too much has changed since the version that shipped with Struts 1.1. A great deal of internal cleanup has happened in commons-validator since its 1.0.2 release as well as new features and a more extensible arg definition. I think Rob Leland is planning on getting a 1.1 release out soon. David So, you may not want to push out a new release at this time. However, it is unfortunate that the ability to modularize development of larger apps with multiple struts-config files and multiple application resource files is pretty much there in the Struts 1.1 release except for mutliple resource files support in Validator. Since it looks like the support for bundle attributes was added at least at the arg level, a dot release now of just the commons-validator would make it possible to use multiple resource files to some degree with the Validator in a Struts 1.1 webapp. I'm not looking for a fixed date commitment. I realize it is all volunteer efforts on this stuff that can't be held to any particular schedule. I'll totally understand if there are no plans to move towards a dot release of Validator anytime soon, but, I am curious as to whether plans to move towards a dot release are imminent or not even on the horizon. -Van Mike Van Riper mailto:[EMAIL PROTECTED] http://www.baychi.org/bof/struts -Original Message- From: Steve Raeburn [mailto:[EMAIL PROTECTED] Sent: Thursday, August 14, 2003 8:41 AM To: Struts Users Mailing List Subject: RE: Struts Validator-validwhen It's not in Struts 1.1 but it's available in the nightly build and will be in the next release. Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: August 14, 2003 8:32 AM To: [EMAIL PROTECTED] Subject: Struts Validator-validwhen Hi, The struts Validator 'validwhen' I could not find anywhere in struts,even though it was mensioned in documentation. If it is available Could anybody please help me where exactly it is available? Thanks, Shailaja -- A . S . C . A . P.-- This message, including any attachments, is intended solely for the person or entity to which it is addressed and may contain information that is legally privileged, confidential or otherwise protected from disclosure. If you are not the intended recipient, please contact sender immediately by reply email and destroy all copies. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Validator-validwhen
It's not in Struts 1.1 but it's available in the nightly build and will be in the next release. Steve -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: August 14, 2003 8:32 AM To: [EMAIL PROTECTED] Subject: Struts Validator-validwhen Hi, The struts Validator 'validwhen' I could not find anywhere in struts,even though it was mensioned in documentation. If it is available Could anybody please help me where exactly it is available? Thanks, Shailaja -- A . S . C . A . P.-- This message, including any attachments, is intended solely for the person or entity to which it is addressed and may contain information that is legally privileged, confidential or otherwise protected from disclosure. If you are not the intended recipient, please contact sender immediately by reply email and destroy all copies. - 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: Struts Validator-nextreleasewhen (was validwhen)
David Graham wrote: I suspect that not too much has changed since the version that shipped with Struts 1.1. A great deal of internal cleanup has happened in commons-validator since its 1.0.2 release as well as new features and a more extensible arg definition. I think Rob Leland is planning on getting a 1.1 release out soon. Yep, I promised to start on it this weekend writing up the release plan. I am sure I'll have basic questions like how the [EMAIL PROTECTED] do I upload the release to the web site. I have read these docs before a long time ago -Rob David -- Robert Leland [EMAIL PROTECTED] -- Java, J2EE, Struts, Web Application Development 804 N. Kenmore Street +01-703-525-3580 Arlington VA 22201
RE: validwhen Alternative
Thanks for the response Imran. plea-for-help I'd rather not do a custom validator if it's not necessary, but if nobody else reponds I might have to bite the bullet and create one... I'm surprised I haven't gotten any other responses, this seems like something that many other people would have run into, or would at least know how to handle... /plea-for-help Thanks in advance! - Keith -Original Message- From: Imran Bohoran [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 12:00 AM To: Struts Users Mailing List Subject: RE: validwhen Alternative We had a requirement of this sought as well. Since we needed it fast, we went ahead with the custom validator. And it works fine. so keith, if you want to get crackin on it I guess the custom validator is the way to go. if anyone else has any other ideas i'll be excited to hear them. - I -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 9:02 PM To: Struts (E-mail) Subject: validwhen Alternative Hey everyone, From what I hear, it seems like the validwhen validation is not supported in the final release of Struts 1.1. Is there an alternative to this? I have a form where 2 of the fields are start range and end range. I want a validation that does the following: 1) If start range is filled in, and end range isn't, validation is successful. 2) If start range is less than or equal to the end range (and end range is greater than or equal to start range), validation is successful. 3) Start range must be filled in. Do I need a custom validator for this, or can I get away with the existing validations? Any help with this would be greatly appreciated, thanks! - Keith - 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]
Validator: Is validwhen available ?
Hi In the Struts Validator User Guide (http://jakarta.apache.org/struts/userGuide/dev_validator.html) I read under Designing Complex Validations with validwhen the following sentence: ... The new validwhen validation rule, which will be included into the Struts release immediately after the 1.1 release, is designed to handle these cases. ... Is the validator with 'validwhen' sowhere available or do we have to wait for the next Struts release? Thanks Koni - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator: Is validwhen available ?
hi, 'validwhen' is available in the nightly builds... -- nagi ---Original Message--- From: Struts Users Mailing List Date: Thursday, July 31, 2003 02:08:30 PM To: [EMAIL PROTECTED] Subject: Validator: Is validwhen available ? HiIn the Struts Validator User Guide (http://jakarta.apache.org/struts/userGuide/dev_validator.html)I read under "Designing Complex Validations with validwhen" the followingsentence:....The new validwhen validation rule, which will be included into the Strutsrelease immediately after the 1.1 release, is designed to handle these cases.Is the validator with 'validwhen' sowhere available or do we have to waitfor the next Struts release?ThanksKoni-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]. IncrediMail - Email has finally evolved - Click Here
RE: Validator: Is validwhen available ?
So it's not available in the initial Struts 1.1 final release? Is there an alternative to validwhen that can do the same job? - Keith -Original Message- From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 4:49 AM To: [EMAIL PROTECTED] Subject: Re: Validator: Is validwhen available ? -- Content-Type: Multipart/Alternative; boundary=Boundary-00=_SHSVLVC0 -- Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable hi,=0D 'validwhen' is available in the nightly builds...=0D =0D -- nagi=0D =0D ---Original Message---=0D =0D From: Struts Users Mailing List=0D Date: Thursday, July 31, 2003 02:08:30 PM=0D To: [EMAIL PROTECTED] Subject: Validator: Is validwhen available ?=0D =0D Hi=0D In the Struts Validator User Guide (http://jakarta.apache org/struts/userGuide/dev_validator.html)=0D I read under Designing Complex Validations with validwhen the following= =0D sentence:=0D =0D =2E...=0D The new validwhen validation rule, which will be included into the Struts= =0D release immediately after the 1.1 release, is designed to handle these ca= ses =0D =2E...=0D =0D Is the validator with 'validwhen' sowhere available or do we have to wait= =0D for the next Struts release?=0D Thanks=0D Koni=0D =0D =0D -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] =0D =0D =2E=20 -- Content-Type: Text/HTML; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable meta http-equiv=3DContent-Type content=3Dtext/html; charset=3Diso-885= 9-1html head meta name=3DGENERATOR content=3DIncrediMail 1.0 !--IncrdiXMLRemarkStart IncrdiX-Info X-FIDFLAVOR00-NONE---/X-FID X-FVER/X-FVER X-CNT;/X-CNT /IncrdiX-Info IncrdiXMLRemarkEnd-- /head BODY background=3D bgColor=3D#ff style=3DBACKGROUND-POSITION: 0px= 0px; FONT-FAMILY: Arial; FONT-SIZE: 12pt; MARGIN: 5px 10px 10px scroll=3D= yes ORGYPOS=3D0 X-FVER=3D3.0 TABLE id=3DINCREDIMAINTABLE border=3D0 cellSpacing=3D0 cellPadding=3D2 w= idth=3D95% TR TD id=3DINCREDITEXTREGION width=3D100% style=3DCURSOR: auto; FONT-FAM= ILY: Arial; FONT-SIZE: 12pt; PADDING-LEFT: 7px; PADDING-RIGHT: 7px=20 DIVhi,/DIV DIV'validwhen' is available in the nightly builds.../DIV DIVnbsp;/DIV DIV-- nagi/DIV DIVnbsp;/DIV DIV id=3DIncrediOriginalMessageI---Original Message---= /I/DIV DIVnbsp;/DIV DIV id=3Dreceivestrings DIV dir=3Dltr style=3DFONT-SIZE: 11pt iBFrom:/B/I A=20 href=3Dmailto:[EMAIL PROTECTED]Struts Users Mailing= =20 List/A/DIV DIV dir=3Dltr style=3DFONT-SIZE: 11pt iBDate:/B/I Thursd= ay, July=20 31, 2003 02:08:30 PM/DIV DIV dir=3Dltr style=3DFONT-SIZE: 11pt iBTo:/B/I A=20 href=3Dmailto:[EMAIL PROTECTED][EMAIL PROTECTED] apache.org/A/DIV DIV dir=3Dltr style=3DFONT-SIZE: 11pt iBSubject:/B/I Val= idator: Is=20 validwhen available ?/DIV/DIV DIVnbsp;/DIVHiBRIn the Struts Validator User Guide (A=20 href=3Dhttp://jakarta.apache.org/struts/userGuide/dev_validator.ht= mlhttp://jakarta.apache.org/struts/userGuide/dev_validator.html/A)BR= I=20 read under Designing Complex Validations with validwhen the=20 followingBRsentence:BRBRBRThe new validwhen validation = rule,=20 which will be included into the StrutsBRrelease immediately after= the=20 1.1 release, is designed to handle these cases.BRBRBRIs t= he=20 validator with 'validwhen' sowhere available or do we have to wait= BRfor=20 the next Struts=20 release?BRThanksBRKoniBRBRBR-= -- unsubscribe, e-mail: A=20 href=3Dmailto:[EMAIL PROTECTED]struts-u= [EMAIL PROTECTED]/ABRFor=20 additional commands, e-mail: A=20 href=3Dmailto:[EMAIL PROTECTED]struts-user-hel= [EMAIL PROTECTED]/ABRBRBR./TD /TR TR TD id=3DINCREDIFOOTER width=3D100% =09TABLE cellPadding=3D0 cellSpacing=3D0 width=3D100% =09TR =09TD width=3D100%/TD =09TD align=3Dmiddle id=3DINCREDISOUND vAlign=3Dbottom/TD =09TD align=3Dmiddle id=3DINCREDIANIM vAlign=3Dbottom/TD =09/TR =09/TABLE /TD /TR /TABLESPAN=20 id=3DIncrediStampSPAN dir=3DltrFONT face=3DArial, Helvetica, sans-se= rif=20 size=3D2BRFONT=20 face=3DComic Sans MS size=3D2A=20 href=3Dhttp://www.incredimail.com/redir.asp?ad_id=3D309amp;lang=3D9;I= MG=20 align=3Dbaseline alt=3D border=3D0 hspace=3D0=20 src=3Dcid:5480A88E-200C-4DF6-B083-86DF293AF940;/Anbsp; IIncrediMai= l/I -=20 BEmail has finally evolved/B - /FONTA=20 href=3Dhttp://www.incredimail.com/redir.asp?ad_id=3D309amp;lang=3D9;F= ONT=20 face=3DTimes New Roman size=3D3BUClick=20 Here/U/B/FONT/A/SPAN/SPAN/FONT /BODY /html -- -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validator: Is validwhen available ?
The nightly builds are not working for now because of a problem with the build machine. ValidWhen has been added to the source but, for now, you'll need to check it out from CVS and do your own build. It will be included in the 1.2 release which will come along a lot sooner than the 1.1 release did :-) Steve -Original Message- From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] Sent: July 31, 2003 1:49 AM To: [EMAIL PROTECTED] Subject: Re: Validator: Is validwhen available ? hi, 'validwhen' is available in the nightly builds... -- nagi ---Original Message--- From: Struts Users Mailing List Date: Thursday, July 31, 2003 02:08:30 PM To: [EMAIL PROTECTED] Subject: Validator: Is validwhen available ? Hi In the Struts Validator User Guide (http://jakarta.apache.org/struts/userGuide/dev_validator.html) I read under Designing Complex Validations with validwhen the following sentence: The new validwhen validation rule, which will be included into the Struts release immediately after the 1.1 release, is designed to handle these cases. Is the validator with 'validwhen' sowhere available or do we have to wait for the next Struts release? Thanks Koni - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . IncrediMail - Email has finally evolved - Click Here
RE: Validator: Is validwhen available ?
Hmm. I'm not going to be impatient, but do we have any rough idea how long it will be until the 1.2 release comes out? Just curious. Anyway, thanks for answering my question. - Keith -Original Message- From: Steve Raeburn [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 10:59 AM To: Struts Users Mailing List Subject: RE: Validator: Is validwhen available ? The nightly builds are not working for now because of a problem with the build machine. ValidWhen has been added to the source but, for now, you'll need to check it out from CVS and do your own build. It will be included in the 1.2 release which will come along a lot sooner than the 1.1 release did :-) Steve -Original Message- From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] Sent: July 31, 2003 1:49 AM To: [EMAIL PROTECTED] Subject: Re: Validator: Is validwhen available ? hi, 'validwhen' is available in the nightly builds... -- nagi ---Original Message--- From: Struts Users Mailing List Date: Thursday, July 31, 2003 02:08:30 PM To: [EMAIL PROTECTED] Subject: Validator: Is validwhen available ? Hi In the Struts Validator User Guide (http://jakarta.apache.org/struts/userGuide/dev_validator.html) I read under Designing Complex Validations with validwhen the following sentence: The new validwhen validation rule, which will be included into the Struts release immediately after the 1.1 release, is designed to handle these cases. Is the validator with 'validwhen' sowhere available or do we have to wait for the next Struts release? Thanks Koni - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . IncrediMail - Email has finally evolved - Click Here - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validator: Is validwhen available ?
The only possible answer is when it's ready. I would cautiously say within the next quarter. It could be a lot sooner than that and I doubt it will be any longer. What I do know is that there won't be any major new features. It's primarily a 'tidy-up' release with internal reorganization of the code and removal of deprecations. Keep monitoring the struts-dev list for activity. Steve -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: July 31, 2003 8:00 AM To: 'Struts Users Mailing List' Subject: RE: Validator: Is validwhen available ? Hmm. I'm not going to be impatient, but do we have any rough idea how long it will be until the 1.2 release comes out? Just curious. Anyway, thanks for answering my question. - Keith -Original Message- From: Steve Raeburn [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 10:59 AM To: Struts Users Mailing List Subject: RE: Validator: Is validwhen available ? The nightly builds are not working for now because of a problem with the build machine. ValidWhen has been added to the source but, for now, you'll need to check it out from CVS and do your own build. It will be included in the 1.2 release which will come along a lot sooner than the 1.1 release did :-) Steve -Original Message- From: Nagendra Kumar O V S [mailto:[EMAIL PROTECTED] Sent: July 31, 2003 1:49 AM To: [EMAIL PROTECTED] Subject: Re: Validator: Is validwhen available ? hi, 'validwhen' is available in the nightly builds... -- nagi ---Original Message--- From: Struts Users Mailing List Date: Thursday, July 31, 2003 02:08:30 PM To: [EMAIL PROTECTED] Subject: Validator: Is validwhen available ? Hi In the Struts Validator User Guide (http://jakarta.apache.org/struts/userGuide/dev_validator.html) I read under Designing Complex Validations with validwhen the following sentence: The new validwhen validation rule, which will be included into the Struts release immediately after the 1.1 release, is designed to handle these cases. Is the validator with 'validwhen' sowhere available or do we have to wait for the next Struts release? Thanks Koni - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] . IncrediMail - Email has finally evolved - Click Here - 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: validwhen Alternative
We had a requirement of this sought as well. Since we needed it fast, we went ahead with the custom validator. And it works fine. so keith, if you want to get crackin on it I guess the custom validator is the way to go. if anyone else has any other ideas i'll be excited to hear them. - I -Original Message- From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2003 9:02 PM To: Struts (E-mail) Subject: validwhen Alternative Hey everyone, From what I hear, it seems like the validwhen validation is not supported in the final release of Struts 1.1. Is there an alternative to this? I have a form where 2 of the fields are start range and end range. I want a validation that does the following: 1) If start range is filled in, and end range isn't, validation is successful. 2) If start range is less than or equal to the end range (and end range is greater than or equal to start range), validation is successful. 3) Start range must be filled in. Do I need a custom validator for this, or can I get away with the existing validations? Any help with this would be greatly appreciated, thanks! - Keith - 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: Validator validwhen
It is not supported, but you can get it from the CVS repository. []s Michael Nascimento Santos JSR-207 Expert Group Member Sun Certified Programmer for the Java 2 Platform Sun Certified Programmer for the Java 2 Platform 1.4 Sun Certified Web Component Developer for J2EE Moderador SouJava - www.soujava.org.br - Original Message - From: Lukas Bradley [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 23, 2003 6:35 PM Subject: Validator validwhen A quote from http://jakarta.apache.org/struts/userGuide/dev_validator.html The new validwhen validation rule, which will be included into the Struts release immediately after the 1.1 release, is designed to handle these cases. Does this mean validwhen is or is not supported in 1.1? I can interpret that statement either way. Lukas - 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]
Validator validwhen
A quote from http://jakarta.apache.org/struts/userGuide/dev_validator.html The new validwhen validation rule, which will be included into the Struts release immediately after the 1.1 release, is designed to handle these cases. Does this mean validwhen is or is not supported in 1.1? I can interpret that statement either way. Lukas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator validwhen
Lukas Bradley wrote: A quote from http://jakarta.apache.org/struts/userGuide/dev_validator.html The new validwhen validation rule, which will be included into the Struts release immediately after the 1.1 release, is designed to handle these cases. Does this mean validwhen is or is not supported in 1.1? I can interpret that statement either way. Nightly build only. Just because it is in the CVS HEAD doesn't mean it will be in the 1.2 release. -Rob Lukas -- Rob Leland - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validwhen released?
Hello, I would like to use validwhen validation rule, but I am unsure whether the recently released Struts 1.1 includes this. I heard that it does, but according to http://jakarta.apache.org/struts/userGuide/dev_validator.html, validwhen will be released in a release after the 1.1 release. I was wondering if anyone can clear this up for me. Also, if validwhen is not in 1.1, I would be curious to know when a release with validwhen will be made. We need this for a web app that is supposed to go in production by the end of July 2003. Thank you, Otis Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validwhen released?
No this is not in 1.1 at all. -Tim -Original Message- From: otisg [mailto:[EMAIL PROTECTED] Sent: Thursday, July 17, 2003 10:27 AM To: [EMAIL PROTECTED] Subject: validwhen released? Hello, I would like to use validwhen validation rule, but I am unsure whether the recently released Struts 1.1 includes this. I heard that it does, but according to http://jakarta.apache.org/struts/userGuide/dev_validator.html, validwhen will be released in a release after the 1.1 release. I was wondering if anyone can clear this up for me. Also, if validwhen is not in 1.1, I would be curious to know when a release with validwhen will be made. We need this for a web app that is supposed to go in production by the end of July 2003. Thank you, Otis Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag - 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: validwhen released?
--- otisg [EMAIL PROTECTED] wrote: Hello, I would like to use validwhen validation rule, but I am unsure whether the recently released Struts 1.1 includes this. I heard that it does, but according to http://jakarta.apache.org/struts/userGuide/dev_validator.html, validwhen will be released in a release after the 1.1 release. I was wondering if anyone can clear this up for me. Also, if validwhen is not in 1.1, I would be curious to know when a release with validwhen will be made. We need this for a web app that is supposed to go in production by the end of July 2003. The validwhen validation is in the nightly builds after 1.1 and will be released with Struts 1.2. David Thank you, Otis Get your own 800 number Voicemail, fax, email, and a lot more http://www.ureach.com/reg/tag - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validwhen released?
David Graham wrote: The validwhen validation is in the nightly builds after 1.1 and will be released with Struts 1.2. So when will Struts 1.2 be released? :) (For the humor-impaired, that *was* a smiley up there...) Bruce - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validator validwhen not working?
Hi, I'm trying to use validwhen, so that it's only valid when either all three related fields are empty or are filled, it's valid; otherwise not. ssn_1, ssn_2, and ssn_3 are the field names. For some reason, when I put this in, none of the validation takes place, not even required, minlength, maxlength, nor mask, which all worked before I put validwhen in there. Did I do anything wrong? Here's the one of the fields in my validation.xml file: field property=ssn_1 depends=validwhen, required, minlength, maxlength, mask msg name=required key=errors.required.enter / msg name=minlength key=errors.minlength.digit / msg name=maxlength key=errors.maxlength.digit / msg name=mask key=errors.mask.numeric / arg0 key=ssn_1.displayName / arg1 name=minlength key=${var:minlength} resource=false / arg1 name=maxlength key=${var:maxlength} resource=false / var var-nametest/var-name var-value( (*this* == null) and (ssn_2 == null) and (ssn_3 == null) )/var-value /var var var-nameminlength/var-name var-value3/var-value /var var var-namemaxlength/var-name var-value3/var-value /var var var-namemask/var-name var-value^\d*$/var-value /var /field Thanks. JP. ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validator validwhen not working?
Are you using a nightly build after 1.1 final? ValidWhen was not included with 1.1. David --- Poon, Johnny [EMAIL PROTECTED] wrote: Hi, I'm trying to use validwhen, so that it's only valid when either all three related fields are empty or are filled, it's valid; otherwise not. ssn_1, ssn_2, and ssn_3 are the field names. For some reason, when I put this in, none of the validation takes place, not even required, minlength, maxlength, nor mask, which all worked before I put validwhen in there. Did I do anything wrong? Here's the one of the fields in my validation.xml file: field property=ssn_1 depends=validwhen, required, minlength, maxlength, mask msg name=required key=errors.required.enter / msg name=minlength key=errors.minlength.digit / msg name=maxlength key=errors.maxlength.digit / msg name=mask key=errors.mask.numeric / arg0 key=ssn_1.displayName / arg1 name=minlength key=${var:minlength} resource=false / arg1 name=maxlength key=${var:maxlength} resource=false / var var-nametest/var-name var-value( (*this* == null) and (ssn_2 == null) and (ssn_3 == null) )/var-value /var var var-nameminlength/var-name var-value3/var-value /var var var-namemaxlength/var-name var-value3/var-value /var var var-namemask/var-name var-value^\d*$/var-value /var /field Thanks. JP. ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validator validwhen not working?
David, I'm using jakarta-struts-1.1-rc2. Is that what you considered a 1.1 final? How can I find out whether if validwhen is in my struts? I also tried to install the nightly builds jakarta-struts-20030605.zip, it is still not working. Any other clue? Thanks in advance! JP -Original Message- From: David Graham [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 11:56 AM To: Struts Users Mailing List Subject: Re: validator validwhen not working? Are you using a nightly build after 1.1 final? ValidWhen was not included with 1.1. David --- Poon, Johnny [EMAIL PROTECTED] wrote: Hi, I'm trying to use validwhen, so that it's only valid when either all three related fields are empty or are filled, it's valid; otherwise not. ssn_1, ssn_2, and ssn_3 are the field names. For some reason, when I put this in, none of the validation takes place, not even required, minlength, maxlength, nor mask, which all worked before I put validwhen in there. Did I do anything wrong? Here's the one of the fields in my validation.xml file: field property=ssn_1 depends=validwhen, required, minlength, maxlength, mask msg name=required key=errors.required.enter / msg name=minlength key=errors.minlength.digit / msg name=maxlength key=errors.maxlength.digit / msg name=mask key=errors.mask.numeric / arg0 key=ssn_1.displayName / arg1 name=minlength key=${var:minlength} resource=false / arg1 name=maxlength key=${var:maxlength} resource=false / var var-nametest/var-name var-value( (*this* == null) and (ssn_2 == null) and (ssn_3 == null) )/var-value /var var var-nameminlength/var-name var-value3/var-value /var var var-namemaxlength/var-name var-value3/var-value /var var var-namemask/var-name var-value^\d*$/var-value /var /field Thanks. JP. ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. ** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validwhen
Hi. I can't make validwhen to work with a DynaForm. My validation.xml looks like form-validation formset form name=countryForm field property=name depends=validwhen arg0 key=countryForm.name.label/ var var-nametest/var-name var-value(1==-1)/var-value /var /field /form /formset /form-validation But it always validates successfully (when depends is set to required everything works as it should, but not as i need to). Other stuff is in struts-config: form-bean name=countryForm type=org.apache.struts.validator.DynaValidatorForm form-property name=name type=java.lang.String/ form-property name=regionname type=java.lang.String/ /form-bean action path=/wa/countries type=wire.web.CountryAction name=countryForm scope=request input=/wa/go_countries.do /action in jsp: html:form action=/wa/countries focus=name tr td bean:message key=country.new/ /td td html:text property=name size=16 maxlength=16/ /td /tr tr td colspan=2 html:submit property=submit value=Add/ html:hidden property=action value=add/ /td /tr /html:form if it matters Please, help. wbr, eugen. -- , .. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: validwhen
Validwhen is not available yet. It will be available in 1.2 (see other posts in archives regarding this). -Tim -Original Message- From: Eugen Bushuev [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 01, 2003 10:31 AM To: [EMAIL PROTECTED] Subject: validwhen Hi. I can't make validwhen to work with a DynaForm. My validation.xml looks like form-validation formset form name=countryForm field property=name depends=validwhen arg0 key=countryForm.name.label/ var var-nametest/var-name var-value(1==-1)/var-value /var /field /form /formset /form-validation But it always validates successfully (when depends is set to required everything works as it should, but not as i need to). Other stuff is in struts-config: form-bean name=countryForm type=org.apache.struts.validator.DynaValidatorForm form-property name=name type=java.lang.String/ form-property name=regionname type=java.lang.String/ /form-bean action path=/wa/countries type=wire.web.CountryAction name=countryForm scope=request input=/wa/go_countries.do /action in jsp: html:form action=/wa/countries focus=name tr td bean:message key=country.new/ /td td html:text property=name size=16 maxlength=16/ /td /tr tr td colspan=2 html:submit property=submit value=Add/ html:hidden property=action value=add/ /td /tr /html:form if it matters Please, help. wbr, eugen. -- , .. - 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]
validwhen in the validation-rules?
I can't find any examples of validwhen in the validation rules. Does anyone have a working example for me to use? --- Thanks... Mick Knutson --- _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: validwhen in the validation-rules?
--- Mick Knutson [EMAIL PROTECTED] wrote: I can't find any examples of validwhen in the validation rules. Does anyone have a working example for me to use? validwhen is not included with Struts 1.1. It will be released with 1.2. David --- Thanks... Mick Knutson --- _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]