From: Bernd H. <ber...@gm...> - 2005-10-21 16:12:23
|
Hello Raphael, > Good idea! Do you have write access to the AT repository? Nope. > Maybe the PloneLanguageTool should just be extended to do this Yes, I had the same idea, but I'm a bit shy of the administrative overhead involved... > >> Alas, the Zope form preprocessing took me by surprise. Now you just >> need to tell me that you can make the ZPublisher language aware by >> just setting this nifty litte configuration parameter... > Basically, I would suggest to avoid using the ZPublisher "float" conversion altogether. The error message you get when entering a "wrong" float value is kind of user unfriendly anyway. I think changing the record/records.pt to use ${fieldName}.${key}:string:records:ignore_empty instead of ${fieldName}.${key}:${type}:records:ignore_empty might do the deed. Probably it's better to place an "automagic" validator at the begin of the validation chain, that tries to parse the value and report parsing errors via the errors collection. I haven't looked into the validation mechanism, yet, but I think this should be possible. This validator would then also replace the raw string value in the form collection with the parsed float value. Then user defined validators need not do their own parsing... We'll see where I get. Bernd Bernd |