Module: Reform::Form::Validate
- Included in:
- Reform::Form
- Defined in:
- lib/reform/form/validate.rb
Overview
Mechanics for writing to forms in #validate.
Defined Under Namespace
Instance Method Summary collapse
-
#update!(params) ⇒ Object
Some users use this method to pre-populate a form.
-
#validate(params) ⇒ Object
1.
Instance Method Details
#update!(params) ⇒ Object
Some users use this method to pre-populate a form. Not saying this is right, but we’ll keep this method here.
87 88 89 |
# File 'lib/reform/form/validate.rb', line 87 def update!(params) deserialize!(params) end |
#validate(params) ⇒ Object
-
Populate the form object graph so that each incoming object has a representative form object.
-
Deserialize. This is wrong and should be done in 1.
-
Validate the form object graph.
79 80 81 82 83 |
# File 'lib/reform/form/validate.rb', line 79 def validate(params) update!(params) super() # run the actual validation on self. end |