Depends on how good you are with the validation framework.  You can 
write your own validation for this.  Or you need to do this in two steps.

 requireif_and_notrequireif

-Yan

-----Original Message-----
From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] 
Sent: November 5, 2003 3:33 PM
To: Struts Users Mailing List
Subject: RE: Struts-Validation


yes....I should restrict the user to enter both fields i.e they should enter
anyone of the fields and not both.

>>That's a self-contradiction if you want to use them at the same time.
>>You will need to write your own validation for that.

you mean to say separate JavaScript or whatever to validate this condition...???

-Ram


-----Original Message-----
From: Yansheng Lin [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 5:29 PM
To: 'Struts Users Mailing List'
Subject: RE: Struts-Validation


So you are saying you need something like 
        notRequireIf
for field2, right?

That's a self-contradiction if you want to use them at the same time.
You will need to write your own validation for that.

-----Original Message-----
From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] 
Sent: November 5, 2003 1:54 PM
To: [EMAIL PROTECTED]
Subject: Struts-Validation


Hi,
           I hv two fields field1 and field2 

1. If field1 is null while field2 is empty I should throw error message that
anyone of the field is mandatory....>>>>>>>>>I implemented using requiredif and
its working fine.
2. when both fields are entered I should throw an error message that enter
anyone of the field and not both.....>>>>>>> Can anybody suggest me how to
handle such condition using Struts validation.xml..????

Tnx in advance.

-Ram



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


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


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


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

Reply via email to