Ashley, DM 0.9 turned blank strings into nil values for Integer properties, which still seems like the right thing to do. Rejecting a blank string as an illegal field value seems like the worst of all possible behaviors.
I do not see this as data scrubbing, but rather sensible typecasting. The Integer property accepts strings like "5", so accepting a string like "" is a natural feature. ..tony.. On Mon, Oct 12, 2009 at 1:59 PM, Ashley Moran <[email protected] > wrote: > > > On 12 Oct 2009, at 21:19, Simon Harris wrote: > > > Have you tried my dm-trimmer plugin? > Http://github.com/harukizaemon/dm-trimmer > > Simon/Tony > > This is a recurrent problem in webapps. Browsers don't (and can't) > distinguish between a missing field and a blank string field. I have > a gut feeling the data should be cleansed at the controller level. > But wherever, this is, IMHO, not an ORM problem, but a web framework > one. > > Any thoughts on how a good solution may be implemented? > > Ashley > > -- > http://www.patchspace.co.uk/ > http://www.linkedin.com/in/ashleymoran > http://aviewfromafar.net/ > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---
