Sha256: 00c989e866faf3a3776a4e062bcc86389204cf6e703ef59c2b03dea3149828ac

Contents?: true

Size: 580 Bytes

Versions: 6

Compression:

Stored size: 580 Bytes

Contents

module {{namespace_module}}
  module Accounts
    module Destroy
      class Validator
        include Shogun::Validator
        include Accounts

        ID_MATCH = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/

        def initialize(data:)
          @verifiers = [
            Shogun::Verifier::Presence.new(data: data.id, name: "id"),
            Shogun::Verifier::Match.new(data: data.id, name: "id", comparison: ID_MATCH),
            Shogun::Verifier::Presence.new(data: data.session, name: "session")
          ]
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
shogun-6.4.2 scaffold/new/project/lib/namespace/accounts/destroy/validator.rb
shogun-6.4.1 scaffold/new/project/lib/namespace/accounts/destroy/validator.rb
shogun-6.4.0 scaffold/new/project/lib/namespace/accounts/destroy/validator.rb
shogun-6.3.0 scaffold/new/project/lib/namespace/accounts/destroy/validator.rb
shogun-6.2.3 scaffold/new/project/lib/namespace/accounts/destroy/validator.rb
shogun-6.2.2 scaffold/new/project/lib/namespace/accounts/destroy/validator.rb