cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karel Vervaeke <karel.verva...@telenet.be>
Subject Re: CForms validation integers
Date Sat, 04 Sep 2004 09:51:12 GMT
I have no idea why "1A" is a valid number, but
maybe you could work around it by including a regexp validator

<fd:validation>

  <fd:regexp pattern="[0-9]*">
     <fd:failmessage>Numbers only please!</fd:failmessage>
  </fd:regexp>
</fd:validation>

Greetings,
Karel

defe wrote:

> hi,
>
> How can i simply make sure a user will only input numeric characters
> in a text field?
>
> it does not completely works with the following:
>
> <fd:field id="foo" required="true">
>    <fd:label>foo</fd:label>
>    <fd:datatype base="integer"/>
> </fd:field>
>
> thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


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


Mime
View raw message