cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Chávez <ccha...@agssa.net>
Subject Re: [Widget] Problem validating the length of a string field
Date Fri, 21 Jan 2005 00:06:00 GMT

Hank Heidt Escribio :-)
>
> Hi,
>
> I am a Cocoon Forms newbie and I am having problems validating the
> length of a widget in a repeater.
>
> When the entered length of the field is zero (i.e., nothing is entered
> or I enter some characters and then press backspace) it passes
> validation even though I have specified the length to be a minimum of at
> least one character. Any ideas how to fix this?
>
> Here is the widget definition that I am using:
>
> <fd:field id="description">
> 	<fd:label>Description</fd:label>
> 	<fd:datatype base="string"/>
> 	<fd:validation>
> 		<fd:length min="1" max="256">
> 			<fd:failmessage>The description must be between
> 1 and 256 characters long.</fd:failmessage>
> 		</fd:length>
> 	</fd:validation>
> 	<fd:hint>Enter a description for the report.</fd:hint>
> </fd:field>

  Hi Hank.

  The problem is what the field is not required, so if the field is
  empty the validation is not fire.

  Cheers.

>
>
> Thanks for any help!
>
> -Hank
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


-- 
Carlos Chávez

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


Mime
View raw message