Sha256: da0eff1547abbaebb4eabf2f08c1f955a54ad0b5b94d005d44af0c88b0756d3d

Contents?: true

Size: 1.39 KB

Versions: 11

Compression:

Stored size: 1.39 KB

Contents

module Judge

  module MessageConfig

    ALLOW_BLANK = [
      :format,
      :exclusion,
      :inclusion,
      :length
    ]

    MESSAGE_MAP = {
      :confirmation => { :base => :confirmation },
      :acceptance   => { :base => :accepted },
      :presence     => { :base => :blank },
      :length       => { :base => nil,
                         :options => {
                           :minimum => :too_short,
                           :maximum => :too_long,
                           :is      => :wrong_length    
                         }
                       },
      :format       => { :base => :invalid },
      :inclusion    => { :base => :inclusion },
      :exclusion    => { :base => :exclusion },
      :numericality => { :base => :not_a_number,
                         :options => {
                           :greater_than             => :greater_than, 
                           :greater_than_or_equal_to => :greater_than_or_equal_to, 
                           :equal_to                 => :equal_to, 
                           :less_than                => :less_than, 
                           :less_than_or_equal_to    => :less_than_or_equal_to,
                           :odd                      => :odd,
                           :even                     => :even
                         }
                       },
      :uniqueness   => { :base => :taken }
    }

  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
judge-3.1.0 lib/judge/message_config.rb
judge-3.0.0 lib/judge/message_config.rb
judge-2.1.1 lib/judge/message_config.rb
judge-2.1.0 lib/judge/message_config.rb
judge-2.0.6 lib/judge/message_config.rb
judge-2.0.5 lib/judge/message_config.rb
judge-2.0.4 lib/judge/message_config.rb
judge-2.0.3 lib/judge/message_config.rb
judge-2.0.2 lib/judge/message_config.rb
judge-2.0.1 lib/judge/message_config.rb
judge-2.0.0 lib/judge/message_config.rb