Rafael Taboada wrote:

Hi folks I'm using validation framework in order to validate my fields in a form.
I have three fields in a search form:
strUsername
strFromDate
strToDate
But we have the rule that the user can fill strUsername or use dates range. I mean he can search by username or he can search by dates range... When I use validation, it validates all the fields.... My question is how can I set my search rule??? the user can search by username or by dates range... If he choose username so validation only has to validate username field... But if he choose dates range, so validation has to validate only FromDate and ToDate...
Any help would be appreciated...
Thanks in advance.

You have at least 3 choices:
1. client side validation i.e. to use javascript onSubmit to check such logic
2. write your own validator - see commons-validator for more info
3. validate it in the form.validate() metod
all 3 have +/- I recomend you the 3th method.

Regards
Borislav

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

Reply via email to