Sha256: 4b1669c34a5007b876137123f54d8b2fc370d17429dc264a5d61e4cdcf2c843f

Contents?: true

Size: 936 Bytes

Versions: 20

Compression:

Stored size: 936 Bytes

Contents

module Phcmembers
	class Members::Listing < ActiveRecord::Base

		# Model Relationships
		belongs_to :main, class_name: 'Members::Main'
		has_many :catlists, class_name: 'Directory::Catlist', dependent: :destroy

		# Validation for Form Fields
		validates :mlcontactname,
			presence: true,
			length: { minimum: 3 }

		validates :mlcompanyname,
			presence: true,
			length: { minimum: 2 }

		validates :mlcity,
			presence: true,
			length: { minimum: 3 }

		validates :mlprovince,
			presence: true,
			length: { minimum: 2 }

		validates :mlpostalcode,
			presence: true,
			length: { minimum: 6 }

		validates :mlcountry,
			presence: true,
			length: { minimum: 2 }

		validates :mlphone,
			presence: true,
			format: { with: /\A(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}\z/, message: "Please Follow this Phone Number Format: xxx-xxx-xxxx" }

		validates :mlwebsite,
			presence: true,
			length: { minimum: 3 }

	end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
phcmembers-2.2.0 app/models/phcmembers/members/listing.rb
phcmembers-2.1.3 app/models/phcmembers/members/listing.rb
phcmembers-2.1.2 app/models/phcmembers/members/listing.rb
phcmembers-2.1.1 app/models/phcmembers/members/listing.rb
phcmembers-2.1.0 app/models/phcmembers/members/listing.rb
phcmembers-2.0.0 app/models/phcmembers/members/listing.rb
phcmembers-1.9.9 app/models/phcmembers/members/listing.rb
phcmembers-1.9.5 app/models/phcmembers/members/listing.rb
phcmembers-1.9.0 app/models/phcmembers/members/listing.rb
phcmembers-1.8.1 app/models/phcmembers/members/listing.rb
phcmembers-1.8.0 app/models/phcmembers/members/listing.rb
phcmembers-1.7.8 app/models/phcmembers/members/listing.rb
phcmembers-1.7.6 app/models/phcmembers/members/listing.rb
phcmembers-1.7.5 app/models/phcmembers/members/listing.rb
phcmembers-1.7.0 app/models/phcmembers/members/listing.rb
phcmembers-1.6.0 app/models/phcmembers/members/listing.rb
phcmembers-1.5.0 app/models/phcmembers/members/listing.rb
phcmembers-1.0.2 app/models/phcmembers/members/listing.rb
phcmembers-1.0.1 app/models/phcmembers/members/listing.rb
phcmembers-1.0.0 app/models/phcmembers/members/listing.rb