Sha256: 9ed5321bf88b508ac0370cc8a195a9d94b12105d6d0885e8c049d796af68f8a1

Contents?: true

Size: 494 Bytes

Versions: 2

Compression:

Stored size: 494 Bytes

Contents

class Foo < ActiveRecord::Base

  validates :one, :presence => true
  validates :two, :length => { :in => 5..10, :allow_blank => true }
  validates :three, :exclusion => { :in => %w{foo bar} }
  validates :four, :numericality => { :only_integer => true, :odd => true, :less_than_or_equal_to => 7 },
                   :exclusion => { :in => [3,12] }
  validates :five, :format => { :without => /[A-Za-z]+/ }
  validates :six, :acceptance => true
  validates :seven, :confirmation => true

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
judge-0.3.1 test/dummy/app/models/foo.rb
judge-0.3.0 test/dummy/app/models/foo.rb