Sha256: b3459340ace1dae4c71f88b35bdf838d3a4c6f8c6b234638a2d994fe1c65fc3a
Contents?: true
Size: 887 Bytes
Versions: 20
Compression:
Stored size: 887 Bytes
Contents
module Phcmemberspro class Member::Profile < ApplicationRecord # Add Paper Trail has_paper_trail # Gravatar include Gravtastic gravtastic :memail # Model Relationship has_many :addresses, class_name: 'Phcmemberspro::Member::Address' has_many :listings, class_name: 'Phcmemberspro::Member::Listing' # Validation for Form Fields validates :mfirstname, presence: true, length: { minimum: 1 } validates :mlastname, presence: true, length: { minimum: 1 } validates :mtitle, length: { minimum: 2 } validates :memail, presence: true, length: { minimum: 6 } validates :mphone, 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" } end end
Version data entries
20 entries across 20 versions & 1 rubygems