> -----Original Message-----
> From: Wendy Smoak [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 02, 2004 2:19 PM
> To: Struts Users Mailing List
> Subject: Help Validating Accepted/Not Accepted radio buttons
> 
> 
> I have a form on which the user must accept the terms and 
> conditions when
> registering for an account.  This is done with a pair of 
> radio buttons set
> to "Y" or "N".  (It defaults to "N".)
> 
> What is the best way to set up validation for this field so 
> that if the user
> does not change the selection to "Y", the form is 
> re-displayed with an error
> message?
> 
> How do I validate that a form field is exactly equal to a string?

Two ways:
1) with a mask, where the mask is "Y" or "Yy"
2) validWhen, which I *think* goes something like this:
<var>
        <var-name>test</var-name>
      <var-value>(var == "Y")</var-value>
</var>
assuming that both radio buttons are pointing at the same form property.

> 
> Thanks,
> Wendy Smoak
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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