Requiredif validator
Hi all! I´m trying to validate two fields that depends on another field. What I was doing in S1 is (for field in): field property=in depends=requiredif msg name=validwhen key=ErrorMessages.applicationIdRepresent.sameReference/ arg position=0 key=ProcessorHTTPDetails.in/ msg name=mask key=ProcessorHTTPDetails.in.help/ var var-namefield[0]/var-name var-valueeditParams/var-value /var var var-namefieldTest[0]/var-name var-valueNOTNULL/var-value /var /field But now in S2, there is no requiredif validator :( Any idea about how can I do to get the same validation effect? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Requiredif validator
Hi Pablo Try using validwhen instead - I think rewquiredif was deprecated. I changed all mine and you can achive the same thing although your logic might have to be turned around a bit. Here's an example: form name=completionForm extends=commonBankForm field property=registeredTitle depends=required arg key=completion.registered.title/ /field field property=titleNo depends=validwhen arg key=completion.title.no/ var var-nametest/var-name var-value( (registeredTitle == 'false') or ((registeredTitle == 'true') and (*this* != null)) )/var-value /var /field Richard Gundersen Java Developer Email: [EMAIL PROTECTED] Phone: 01618302398 Fax: 01618342536 London Scottish Bank plc 24 Mount Street Manchester M2 3LS -Original Message- From: Pablo Vázquez Blázquez [mailto:[EMAIL PROTECTED] Sent: Friday, September 07, 2007 12:30 PM To: user@struts.apache.org Subject: Requiredif validator Hi all! I´m trying to validate two fields that depends on another field. What I was doing in S1 is (for field in): field property=in depends=requiredif msg name=validwhen key=ErrorMessages.applicationIdRepresent.sameReference/ arg position=0 key=ProcessorHTTPDetails.in/ msg name=mask key=ProcessorHTTPDetails.in.help/ var var-namefield[0]/var-name var-valueeditParams/var-value /var var var-namefieldTest[0]/var-name var-valueNOTNULL/var-value /var /field But now in S2, there is no requiredif validator :( Any idea about how can I do to get the same validation effect? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ *** Disclaimer *** This electronic communication is confidential and for the exclusive use of the addressee. It may contain private and confidential information. The information, attachments and opinions contained in this E-mail are those of its author only and do not necessarily represent those of London Scottish Bank PLC or any other members of the London Scottish Group. If you are not the intended addressee, you are prohibited from any disclosure, distribution or further copying or use of this communication or the information in it or taking any action in reliance on it. If you have received this communication in error please notify the Information Security Manager at [EMAIL PROTECTED] as soon as possible and delete the message from all places in your computer where it is stored. We utilise virus scanning software but we cannot guarantee the security of electronic communications and you are advised to check any attachments for viruses. We do not accept liability for any loss resulting from any corruption or alteration of data or importation of any virus as a result of receiving this electronic communication. Replies to this E-mail may be monitored for operational or business reasons. London Scottish Bank PLC is regulated by the Financial Services Authority. __ This email has been scanned by the MessageLabs Email Security System. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Requiredif validator
Hi Richard, Looking at http://struts.apache.org/2.x/docs/validation.html I don´t see there was validwhen validator... Besides that, the example you gave me is for Struts 1, isn´t it? I need an Strut2 one. Thanks. Gundersen, Richard escribió: Hi Pablo Try using validwhen instead - I think rewquiredif was deprecated. I changed all mine and you can achive the same thing although your logic might have to be turned around a bit. Here's an example: form name=completionForm extends=commonBankForm field property=registeredTitle depends=required arg key=completion.registered.title/ /field field property=titleNo depends=validwhen arg key=completion.title.no/ var var-nametest/var-name var-value( (registeredTitle == 'false') or ((registeredTitle == 'true') and (*this* != null)) )/var-value /var /field Richard Gundersen Java Developer Email: [EMAIL PROTECTED] Phone: 01618302398 Fax: 01618342536 London Scottish Bank plc 24 Mount Street Manchester M2 3LS -Original Message- From: Pablo Vázquez Blázquez [mailto:[EMAIL PROTECTED] Sent: Friday, September 07, 2007 12:30 PM To: user@struts.apache.org Subject: Requiredif validator Hi all! I´m trying to validate two fields that depends on another field. What I was doing in S1 is (for field in): field property=in depends=requiredif msg name=validwhen key=ErrorMessages.applicationIdRepresent.sameReference/ arg position=0 key=ProcessorHTTPDetails.in/ msg name=mask key=ProcessorHTTPDetails.in.help/ var var-namefield[0]/var-name var-valueeditParams/var-value /var var var-namefieldTest[0]/var-name var-valueNOTNULL/var-value /var /field But now in S2, there is no requiredif validator :( Any idea about how can I do to get the same validation effect? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ *** Disclaimer *** This electronic communication is confidential and for the exclusive use of the addressee. It may contain private and confidential information. The information, attachments and opinions contained in this E-mail are those of its author only and do not necessarily represent those of London Scottish Bank PLC or any other members of the London Scottish Group. If you are not the intended addressee, you are prohibited from any disclosure, distribution or further copying or use of this communication or the information in it or taking any action in reliance on it. If you have received this communication in error please notify the Information Security Manager at [EMAIL PROTECTED] as soon as possible and delete the message from all places in your computer where it is stored. We utilise virus scanning software but we cannot guarantee the security of electronic communications and you are advised to check any attachments for viruses. We do not accept liability for any loss resulting from any corruption or alteration of data or importation of any virus as a result of receiving this electronic communication. Replies to this E-mail may be monitored for operational or business reasons. London Scottish Bank PLC is regulated by the Financial Services Authority. __ This email has been scanned by the MessageLabs Email Security System. - 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]
RequiredIf Validator Doesn't Seem To Work With Nested Properties
Howdy! I'm just wondering if anyone has run across this issue and if so, is there a workaround? It appears that the requiredif validator does not work correctly when using nested properties. Here's my XML: field property=proofNumber depends=requiredif,mask page=1 msg name=mask key=placard.errors.physiciansNumber/ arg0 key=placard.label.physiciansNumber/ var var-namefield[0]/var-name var-valueownerDEO.uniqueIdType/var-value /var var var-namefieldTest[0]/var-name var-valueEQUAL/var-value /var var var-namefieldValue[0]/var-name var-valueB/var-value /var var var-namefield[1]/var-name var-valueproofType/var-value /var var var-namefieldTest[1]/var-name var-valueEQUAL/var-value /var var var-namefieldValue[1]/var-name var-valueP/var-value /var var var-namefieldJoin/var-name var-valueAND/var-value /var var var-namemask/var-name var-value^\d{5}|\d{6}|\d{10}$/var-value /var /field When I had it coded such that the owner.uniqueId was not a nested property (i.e. merely uniqueId), this validation worked perfectly. Now, however, no matter what is entered, the system throws an error. Is there a different syntax that I need to use or is this just a bug? Thanks! Brent This message sent using iMail from I-Land Internet Services. http://www.iland.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RequiredIf Validator Doesn't Seem To Work With Nested Properties
Howdy! I'm just wondering if anyone has run across this issue and if so, is there a workaround? It appears that the requiredif validator does not work correctly when using nested properties. Here's my XML: field property=proofNumber depends=requiredif,mask page=1 msg name=mask key=placard.errors.physiciansNumber/ arg0 key=placard.label.physiciansNumber/ var var-namefield[0]/var-name var-valueownerDEO.uniqueIdType/var-value /var var var-namefieldTest[0]/var-name var-valueEQUAL/var-value /var var var-namefieldValue[0]/var-name var-valueB/var-value /var var var-namefield[1]/var-name var-valueproofType/var-value /var var var-namefieldTest[1]/var-name var-valueEQUAL/var-value /var var var-namefieldValue[1]/var-name var-valueP/var-value /var var var-namefieldJoin/var-name var-valueAND/var-value /var var var-namemask/var-name var-value^\d{5}|\d{6}|\d{10}$/var-value /var /field When I had it coded such that the owner.uniqueId was not a nested property (i.e. merely uniqueId), this validation worked perfectly. Now, however, no matter what is entered, the system throws an error. Is there a different syntax that I need to use or is this just a bug? Thanks! Brent This message sent using iMail from I-Land Internet Services. http://www.iland.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RequiredIf Validator Doesn't Seem To Work With Nested Properties
Howdy! I'm just wondering if anyone has run across this issue and if so, is there a workaround? It appears that the requiredif validator does not work correctly when using nested properties. Here's my XML: field property=proofNumber depends=requiredif,mask page=1 msg name=mask key=placard.errors.physiciansNumber/ arg0 key=placard.label.physiciansNumber/ var var-namefield[0]/var-name var-valueownerDEO.uniqueIdType/var-value /var var var-namefieldTest[0]/var-name var-valueEQUAL/var-value /var var var-namefieldValue[0]/var-name var-valueB/var-value /var var var-namefield[1]/var-name var-valueproofType/var-value /var var var-namefieldTest[1]/var-name var-valueEQUAL/var-value /var var var-namefieldValue[1]/var-name var-valueP/var-value /var var var-namefieldJoin/var-name var-valueAND/var-value /var var var-namemask/var-name var-value^\d{5}|\d{6}|\d{10}$/var-value /var /field When I had it coded such that the owner.uniqueId was not a nested property (i.e. merely uniqueId), this validation worked perfectly. Now, however, no matter what is entered, the system throws an error. Is there a different syntax that I need to use or is this just a bug? Thanks! Brent - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]