I didn't realise it could be used on normal objects... this is actually appealing to me, because on for our non-DB backed models (Login form, Contact form etc) we use ActiveModel, and I don't like that the validations on ActiveModel are just different enough from DataMapper's to cause headaches when working with the two (:message => "A custom message") for one thing, in ActiveModel (rather annoyingly) insists on prepending the field name, while DataMapper (rather nicely) knows that custom means custom, so doesn't change it. If I could be using dm-validations throughout my code, that would be excellent.
What does one need to include to use them on a non-DM object? On 30/05/2011, at 18:38, Emmanuel Gomez wrote: > Hi, > > I've been looking through some of dm-validations, and it's clear that some > things could be simplified and tightened up by only supporting validation of > DM::Resources. > > Is there a reason for dm-validations to make an effort to support non-dm > objects? dm-validations depends on dm-core, so it can't be used independently > (via rubygems, anyway). > > Any thoughts? > > -- Emmanuel > > -- > 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. > -- 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.
