Skip to content
Nick Sutterer edited this page Aug 27, 2015 · 5 revisions

1.0

  • :setter_default and :setup_default. First is applied in twin.name = nil. this can be implemented via :setter which would also allow things like "nullify".

Scalar support?

class ImageForm < Reform::Form
    property :image, :scalar => true do
      validates :size,  numericality: { less_than: 10 }
      validates :length, numericality: { greater_than: 1 } # TODO: make better validators and remove AM::Validators at some point.
    end
  end

Access to parent twin?

in nested form validation:

parent.added?(self)

DONE

  • Allow overriding setter for coercion and getter for presentation (works already). Optional: in setup, write directly to @fields and in sync, read directly from @fields, so they don't interfere.
Clone this wiki locally