You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Frederic Gaus <co...@necroshine.de> on 2004/02/05 19:33:17 UTC

Checkbox and simple-form-validation

Just a simple thing .. but I can not find any hint :(

I'm validating a form using the simple-form-vatidation. The Problem is,
the form should only be successfully validated, if the user enables a
checkbox (to agree the licenses).

The Validator can check agains String, long and double... nothing fits
in this case. Also, none of the constrains fits in this case. But I'm
sure there is a possibility to validate checkboxes :)

Who can help

Freddy

Re: Checkbox and simple-form-validation

Posted by Christian Haul <ha...@informatik.tu-darmstadt.de>.
Frederic Gaus wrote:
> Just a simple thing .. but I can not find any hint :(
> 
> I'm validating a form using the simple-form-vatidation. The Problem is,
> the form should only be successfully validated, if the user enables a
> checkbox (to agree the licenses).
> 
> The Validator can check agains String, long and double... nothing fits
> in this case. Also, none of the constrains fits in this case. But I'm
> sure there is a possibility to validate checkboxes :)

Shouldn't the browser omit the parameter if not checked (or report "") 
and report the @value value otherwise? Then you could check for this
string and state that it may not be null.

	Chris.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org