Sha256: 12b9358cea5a2a4b139d8e2f2ea4f35058598dd09dc6539015d52b88f3442b57

Contents?: true

Size: 585 Bytes

Versions: 14

Compression:

Stored size: 585 Bytes

Contents

# -*- coding: utf-8 -*-

module DataMapper
  module Validations
    module Fixtures
      class PhoneNumber
        #
        # Behaviors
        #

        include ::DataMapper::Resource

        #
        # Properties
        #

        property :id,             Serial
        property :type_of_number, String, :auto_validation => false

        #
        # Validations
        #

        validates_within :type_of_number, :set => %w(home work cell), :message => "Should be one of: home, cell or work"
      end # PhoneNumber
    end # Fixtures
  end # Validations
end # DataMapper

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
ardm-validations-1.2.0 spec/fixtures/phone_number.rb
dm-validations-1.2.0 spec/fixtures/phone_number.rb
dm-validations-1.2.0.rc2 spec/fixtures/phone_number.rb
dm-validations-1.2.0.rc1 spec/fixtures/phone_number.rb
dm-validations-1.1.0 spec/fixtures/phone_number.rb
dm-validations-1.1.0.rc3 spec/fixtures/phone_number.rb
dm-validations-1.1.0.rc2 spec/fixtures/phone_number.rb
dm-validations-1.1.0.rc1 spec/fixtures/phone_number.rb
dm-validations-1.0.2 spec/fixtures/phone_number.rb
dm-validations-1.0.1 spec/fixtures/phone_number.rb
dm-validations-1.0.0 spec/fixtures/phone_number.rb
dm-validations-1.0.0.rc3 spec/fixtures/phone_number.rb
dm-validations-1.0.0.rc2 spec/fixtures/phone_number.rb
dm-validations-1.0.0.rc1 spec/fixtures/phone_number.rb