Sha256: 6220840a717abe0ae735d81f724d1fa43ccc3c668b02a78e0190041cb73c2be6

Contents?: true

Size: 695 Bytes

Versions: 9

Compression:

Stored size: 695 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

9 entries across 9 versions & 1 rubygems

Version Path
phcmemberspro-20.0.4 app/models/phcmemberspro/member/address.rb
phcmemberspro-20.0.3 app/models/phcmemberspro/member/address.rb
phcmemberspro-20.0.2 app/models/phcmemberspro/member/address.rb
phcmemberspro-20.0.1 app/models/phcmemberspro/member/address.rb
phcmemberspro-20.0.0 app/models/phcmemberspro/member/address.rb
phcmemberspro-19.0.1 app/models/phcmemberspro/member/address.rb
phcmemberspro-19.0.0 app/models/phcmemberspro/member/address.rb
phcmemberspro-18.0.1 app/models/phcmemberspro/member/address.rb
phcmemberspro-18.0.0 app/models/phcmemberspro/member/address.rb