trailblazer / reform

Form objects decoupled from models.
https://trailblazer.to/2.1/docs/reform.html
MIT License
2.49k stars 184 forks source link

Reintroduce valid? #495

Closed emaglio closed 4 years ago

emaglio commented 4 years ago

Calls validate({}).

The aim of this method is to check if that specific Form instance is valid if model changes a new form instance MUST be created. We have issues around about calling multiple times validate to the same instance and we know that has problems - this will be fixed in the 3.x

apotonick commented 4 years ago

As bespoke, in Reform 3 the API won't allow validating twice since there won't be an instance to validate but something more like result = Form.validate(presented_form, params).

emaglio commented 4 years ago

@apotonick this will give us compatibility with 2.2.4 and then from 3.0 we will require bigger changes for an upgrade