Hey, I tried to find the way to disable/enable column (aka property name) output into validation errors. Lets say i have 2 situations:
1. Validate model, and show errors near each field unless model is valid. 2. Validate mode, and show list of errors on top of page unless model is valid. Second one is easy, all you have to do - select @model.errors and do whatever you want. But not sure about first method. Is there anything like this: class User include DataMapper::Resource property :id, Serial property :name, String, :length => 2..32, :required => true property :email, String, :format => :email_address, :required => true, :unique => true end And check validation with following statement (something im looking for) user = User.new(params) unless user.valid? errors = user.errors(:keep_names => false) end So, in errors output we`ll see only property name (symbol). Any ideas? -- 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.
