Sha256: e273ea3e5b06933316549ad4a466dede85791449fdd4b837555fc9db8b983092
Contents?: true
Size: 1013 Bytes
Versions: 4
Compression:
Stored size: 1013 Bytes
Contents
module Phcmemberspro class Members::Listing < ActiveRecord::Base # Mount PHCEngine belongs_to :user, :class_name => "Phcengine::User" # 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: 6 } 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
4 entries across 4 versions & 1 rubygems