Sha256: b85628f00bd30e1c547c85f4cb530d6e3bb85465901c0fdb1c721122d3ab63c1

Contents?: true

Size: 579 Bytes

Versions: 3

Compression:

Stored size: 579 Bytes

Contents

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

module DataMapper
  module Validate
    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 # Validate
end # DataMapper

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dm-validations-0.10.2 spec/fixtures/phone_number.rb
dm-validations-0.10.1 spec/fixtures/phone_number.rb
dm-validations-0.10.0 spec/fixtures/phone_number.rb