A little bit tricky.  There are a couple of options.

One: make sure the checkbox is processed before the ValidField for the date.

Create an accessor for the ValidField's validator; return different
instances depending on whether the
checkbox is checked or not.  When the box is checked, make sure the
validator is required.

You could even create a validator that rejects all input, when the box is
not checked.

You could even create server-side JavaScript to enforce this in the browser.



----- Original Message -----
From: "Frank Liu" <[EMAIL PROTECTED]>
To: "Tapestry" <[EMAIL PROTECTED]>
Sent: Sunday, July 14, 2002 8:12 AM
Subject: [Tapestry-developer] validation problem


> Hi there,
>
> I just posted a thread, but forgot to give a title to
> it, it should be "form problem". sorry about it.
>
>
> Now, I have another problem.
> Suppose that I have a date in a form needed to do
> validation when the form is submmited, but the
> date component depends on a check component,
> if the check is only checked, I need the date
> validation works.
>
> How to do?
>
> Frank
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Autos - Get free new car price quotes
> http://autos.yahoo.com
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Tapestry-developer mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/tapestry-developer



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to