[Zope3-Users] z3c.form: Integer-based fields incorrectly validated

Hermann Himmelbauer dusty at qwer.tk
Wed Aug 1 13:15:32 EDT 2007


Hi,
In one of my forms, one field is defined like that:

    foobarid = Int(
        title=u'ID',
        description=u'ID of Foobar',
        required=False)

When I add this field in a z3c.form based form, e.g.:

fields = field.Fields(IFoo['foobarid'])

Then the validation of the field fails, e.g. if I type in a correct value, 
e.g. "123", zope returns an error:

"The entered value is not a valid integer literal."

Interestingly, if I set "1,123" as value, zope outputs:

"Objekttyp ist falsch."

I tried to investigate this futher, but things are getting complicated at the 
file "converter.py", line 96 (no clue what a formatter is).

Is this a bug or am I doing something wrong?

Best Regards,
Hermann

-- 
x1 at aon.at
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7


More information about the Zope3-users mailing list