cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fuat Akal <a...@fgcz.ethz.ch>
Subject Re: validation of fields defined as double or integer?
Date Tue, 28 Oct 2008 10:54:22 GMT
Here is the answer to my question in case somebody needs.

<fd:field id="myField">
    <fd:datatype base="double" >
        <fd:convertor type="plain"/>
    </fd:datatype>
</fd:field>

-fa


Fuat Akal wrote:
> Hello all,
>
> I receive a strange(?) behaviour when I enter non-digit characters 
> into numeric fields. Assume that you define a field of double type as:
>
> <fd:field id="myField">
>            <fd:datatype base="double"/>
> </fd:field>
>
> When I enter a value like "123abc", the value of myField becomes 123. 
> I would expect a validation error here though.
>
> I could write my own validation script to check if the value is 
> properly entered. Then, what is the point in defining the field as 
> double. Anyhow. Is this a bug? If not, what is the easiest way to 
> check if a proper value is entered into myField?
>
> Kind Regards
> Fuat
>
> ---------------------------------------------------------------------
> 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