Hi Udaya,
Thanks for the corrections.
I have just found out that I am missing the public static boolean validateRequiredIf(
)
in the struts-validator.java class which should contain the java functionality to take
care of requiredif validator. So it seems like this patch needs to be added onto the
class file.
Clark
Udaya Allu <[EMAIL PROTECTED]> wrote:
Hi Clark,
The following is similar validation in struts 1.1 final release working fine, for the
case first field is necessary when second field is null, otherwise one of the two
shall be available. Do not bother about additional condition of page attribute of page.
It is just show how to use two fields in required if.
The error your code is in in var-name
change from field-test[0] to fieldTest[0] in final release of struts 1.1
can find this in struts validation doc.
Hope this will help
-Udaya
field[0]
currentPage
fieldTest[0]
EQUAL
fieldValue[0]
1
field[1]
domain
fieldTest[1]
NULL
fieldJoin
AND
mask
^[a-zA-Z0-9]+([-.]*[a-zA-Z0-9])*$
-Original Message-
From: Clark Kent [mailto:[EMAIL PROTECTED]
Sent: Friday, December 12, 2003 12:01 PM
To: Struts Users Mailing List
Subject: requiredif validation challenge
I use Struts 1.1 and tried to add the patch for the requiredif validator in
validator-rules.xml.
Following is the code that I added in the validation.xml for the form. The form has 2
fields and only one of them can be filled inorder to perform a search.
field[0]
userID
field-test[0]
NULL
field[0]
acctID
field-test[0]
NULL
It seems like inspite of the above, it still doesnt seem to validate requiredif
validator and proceeds with the submit anyway. Can someone guide me?
Clark
-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing