Sha256: f3f6489f13907e578ae7351e3bb0865a6ba1a1006f66036213a2621b47720dbc

Contents?: true

Size: 434 Bytes

Versions: 1

Compression:

Stored size: 434 Bytes

Contents

module C80Contest
  # noinspection RailsParamDefResolve
  class Bid < ActiveRecord::Base

    validates :title,
              :presence => true,
              :length => { in: 2..100 }

    validates :phone,
              :presence => true,
              :format => { with: /\A((8|\+?7)[\- ]?)?(\(?\d{3,5}\)?[\- ]?)?[\d\- ]{5,10}\z/}

    validates_presence_of :photo

    mount_uploader :photo, C80Contest::BidPhotoUploader
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
c80_contest-0.1.9 app/models/c80_contest/bid.rb