Module: TempFormValidation
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/concerns/temp_form_validation.rb
Instance Method Summary collapse
Instance Method Details
#form_matches_schema ⇒ Object (private)
19 20 21 22 23 24 25 |
# File 'app/models/concerns/temp_form_validation.rb', line 19 def form_matches_schema if form.present? JSON::Validator.fully_validate(VetsJsonSchema::SCHEMAS[self.class::FORM_ID], parsed_form).each do |v| errors.add(:form, v.to_s) end end end |
#parsed_form ⇒ Object
13 14 15 |
# File 'app/models/concerns/temp_form_validation.rb', line 13 def parsed_form @parsed_form ||= JSON.parse(form) end |