Sha256: 8eae510645cac48aa516c99ffe2b7b71b42e80b90d98ce8cf5ffbe4ce9e48bf2

Contents?: true

Size: 722 Bytes

Versions: 10

Compression:

Stored size: 722 Bytes

Contents

module Phcmemberspro
  class Member::Address < ApplicationRecord

    # Add Paper Trail
    has_paper_trail
    
    # Model Relationships
    belongs_to :profile, class_name: 'Phcmemberspro::Member::Profile'
    
    # Validation for Form Fields
    validates :mcaddressl1,
      presence: true,
      length: { minimum: 2 }
    
    validates :mccity,
      length: { minimum: 3 }
    
    validates :mcprovince,
      presence: true,
      length: { minimum: 2 }
    
    validates :mccountry,
      presence: true,
      length: { minimum: 2 }
    
    validates :mcpostalcode,
      presence: true,
      length: { minimum: 3 }
    
    validates :mctype,
      presence: true,
      length: { minimum: 2 }

  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
phcmemberspro-17.1.4 app/models/phcmemberspro/member/address.rb
phcmemberspro-17.1.3 app/models/phcmemberspro/member/address.rb
phcmemberspro-17.1.2 app/models/phcmemberspro/member/address.rb
phcmemberspro-17.1.1 app/models/phcmemberspro/member/address.rb
phcmemberspro-17.1.0 app/models/phcmemberspro/member/address.rb
phcmemberspro-17.0.3 app/models/phcmemberspro/member/address.rb
phcmemberspro-17.0.2 app/models/phcmemberspro/member/address.rb
phcmemberspro-17.0.1 app/models/phcmemberspro/member/address.rb
phcmemberspro-17.0.0 app/models/phcmemberspro/member/address.rb
phcmemberspro-16.0.2 app/models/phcmemberspro/member/address.rb