Sha256: d0fdd5ab2f27d662825c64cca6cb9371954c9072c396da57bf5651c4e4bd886c
Contents?: true
Size: 332 Bytes
Versions: 2
Compression:
Stored size: 332 Bytes
Contents
class Post < ActiveRecord::Base validates :title, presence: true, length: {within: 20..50}, numericality: {greater_than_or_equal_to: 20, odd: true} validates :title, format: { with: /\A[a-zA-Z]+\z/, message: "only allows letters" } validates :intro, presence: true, if: :published? validates :accepted, acceptance: true end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bootstrap_validator_rails-0.6.0 | test/dummy/app/models/post.rb |
bootstrap_validator_rails-0.5.1 | test/dummy/app/models/post.rb |