Sha256: e5fd9cb0d8525638988bf87ecfecdc35a86f8ea7afcc1645185d88a08490c28b

Contents?: true

Size: 656 Bytes

Versions: 36

Compression:

Stored size: 656 Bytes

Contents

module PactBroker
  module Api
    module Contracts
      module PacticipantNameValidation

        include PactBroker::Messages

        def name_in_pact_present
          unless name_in_pact
            errors.add(:'name', validation_message("pact_missing_pacticipant_name", pacticipant: pacticipant))
          end
        end

        def name_not_blank
          if blank? name
            errors.add(:'name', validation_message("blank"))
          end
        end

        def blank? string
          string && string.strip.empty?
        end

        def empty? string
          string.nil? || blank?(string)
        end
      end
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
pact_broker-2.106.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.105.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.104.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.103.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.102.2 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.102.1 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.102.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.101.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.100.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.99.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.98.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.97.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.96.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.95.1 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.95.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.94.0 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.93.4 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.93.3 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.93.2 lib/pact_broker/api/contracts/pacticipant_name_validation.rb
pact_broker-2.93.1 lib/pact_broker/api/contracts/pacticipant_name_validation.rb