Class: PactBroker::Api::Contracts::WebhookContract
- Inherits:
-
BaseContract
- Object
- Reform::Form
- BaseContract
- PactBroker::Api::Contracts::WebhookContract
- Defined in:
- lib/pact_broker/api/contracts/webhook_contract.rb
Instance Method Summary collapse
Instance Method Details
#validate ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/pact_broker/api/contracts/webhook_contract.rb', line 11 def validate(*) result = super # I just cannot seem to get the validation to stop on the first error. # If one rule fails, they all come back failed, and it's driving me nuts. # Why on earth would I want that behaviour? new_errors = Reform::Contract::Errors.new errors..each do | key, value | new_errors.add(key, value.first) end @errors = new_errors result end |