You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We will start writing Reform 3 once the Trailblazer 2.1 release along with the new website and PRO launch is out. This issue is in a state of flux, defining the planned API.
Immutability: never again will we make that mistake and provide an API that allows changing an object once it's created.
Reduced internal complexity: we probably won't need Representable for parsing anymore.
Coercion/typing: use Dry::Structs that are orchestrated via a simplified twin.
validate
result=Form.validate(form,params)
Fills out the form, and runs the validations. The filled-out form is somehow in result.
Fill-out
We used to have pre-populators to fill-out a form before its validation. Some people even used Form#validate multiple times 🤦♀️. The problem here was that this will also run coercion, which is often not wanted and wrong! (e.g. when you serialized the already validated data and then want to display a "correct me" form).
Form.fill_out(form,data)
This bypasses validation and coercion.
The text was updated successfully, but these errors were encountered:
Allow dynamic collection :sources do ... end s where each source item can have different propertys depending on the underlying item model. Allow that also for the incoming input hash.
We will start writing Reform 3 once the Trailblazer 2.1 release along with the new website and PRO launch is out. This issue is in a state of flux, defining the planned API.
For a discussion about why I really want to abandon Reform 2.x, here's a talk that summarizes it: https://www.youtube.com/watch?v=6eXDAQpaUV8
Design keys
Dry::Struct
s that are orchestrated via a simplified twin.validate
Fills out the form, and runs the validations. The filled-out form is somehow in
result
.Fill-out
We used to have pre-populators to fill-out a form before its validation. Some people even used
Form#validate
multiple times 🤦♀️. The problem here was that this will also run coercion, which is often not wanted and wrong! (e.g. when you serialized the already validated data and then want to display a "correct me" form).This bypasses validation and coercion.
The text was updated successfully, but these errors were encountered: