Thanks Hermann,<br><br>This still does not work for me.  The pattern =
&#39;#,##0.####&#39; seems to have no effect on the converter. Perhaps I&#39;m
doing something wrong, I&#39;m posting my setup below.<br><br>This most
certainly have to be a bug in the system if you can&#39;t put 1.2345 into a
decimal field, no?  If so is there a bug tracker for z3c.form where I
can post this and get it fixed?<br>
<br>#interfaces.py<br>class IFixedDecimal(IDecimal):<br>    &quot;&quot;&quot;Fixed decimal field.&quot;&quot;&quot;<br>    <br>class FixedDecimal(schema.Decimal):<br>    interface.implements(<div id=":y9" class="ii gt">
IFixedDecimal)<br>    <br>class ITaxLot(interface.Interface):<br>
    &quot;&quot;&quot;A tax lot&quot;&quot;&quot;<br>    <br>    quantity = FixedDecimal(<br>        title = u&#39;Quantity&#39;,<br>        required = True)<br><br>#holding.py<br>class MyDecimalDataConverter(DecimalDataConverter): <br>

    &quot;&quot;&quot;Adapt decimal data converter&quot;&quot;&quot;<br>    adapts(IFixedDecimal, IWidget)<div class="im"><br>    # The amount of &#39;#&#39; after the &#39;.&#39; outlines the no. of decimal places<br>    pattern = &#39;#,##0.####&#39;   <br>

<br></div>#configure.zcml<br><br>  &lt;includeOverrides file=&quot;overrides.zcml&quot; /&gt;<br><br>#overrides.zcml<br><br>  &lt;adapter factory=&quot;.holding.MyDecimalDataConverter&quot; /&gt;</div><br><br><div class="gmail_quote">
On Thu, Feb 11, 2010 at 3:21 AM, Hermann Himmelbauer <span dir="ltr">&lt;<a href="mailto:dusty@qwer.tk">dusty@qwer.tk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Am Mittwoch 10 Februar 2010 17:27:09 schrieb Mats Nordgren:<br>
<div><div></div><div class="h5">&gt; I have an interface with a decimal field.  It validates fine for 1,2 and 3<br>
&gt; fractions but if I enter a decimal with 4 fractions I get validation error<br>
&gt; &quot;The entered value is not a valid decimal literal.&quot;<br>
&gt;<br>
&gt; I&#39;m using the pypi release of bluebream and z3c.form 2.3.2.<br>
<br>
</div></div>I remember that one - quite cumbersome. Try something like this:<br>
<br>
# You should use the following interface for your forms:<br>
class IMyDecimal(IDecimal):<br>
    &quot;&quot;&quot;Specify custom decimal interface&quot;&quot;&quot;<br>
<br>
# Now create a custom data converter<br>
class MyDecimalDataConverter(BaseDecimalDataConverter):<br>
    &quot;&quot;&quot;Adapt decimal data converter&quot;&quot;&quot;<br>
    adapts(IMyDecimal, IWidget)<br>
    # The amount of &#39;#&#39; after the &#39;.&#39; outlines the no. of decimal places<br>
    pattern = &#39;#,##0.####&#39;<br>
<br>
# And specify in overrides.zcml<br>
  &lt;adapter  factory=&quot;mymodule.MyDecimalDataConverter&quot; /&gt;<br>
<br>
This works for me.<br>
<br>
Best Regards,<br>
Hermann<br>
<font color="#888888"><br>
--<br>
<a href="mailto:hermann@qwer.tk">hermann@qwer.tk</a><br>
GPG key ID: 299893C7 (on keyservers)<br>
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7<br>
</font></blockquote></div><br>