struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jim Barrows" <jbarr...@sssc.com>
Subject RE: Help Validating Accepted/Not Accepted radio buttons
Date Thu, 02 Dec 2004 21:26:16 GMT
> -----Original Message-----
> From: Wendy Smoak [mailto:java@wendysmoak.com]
> 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message