Sha256: e4af5b9d706738adbd68459a4ce009a2ce2720e146ee36726a8f6ec17277f11b
Contents?: true
Size: 778 Bytes
Versions: 1
Compression:
Stored size: 778 Bytes
Contents
module ValidatesFormattingOf module ValidationMessages class Messages def self.hash { :email => "is not a valid email", :url => "is not a valid URL", :alpha => "must be only letters or dashes", :alphanum => "must be letters, numbers", :credit_card => "is not a valid credit card number", :us_zip => "is not a valid zipcode", :us_phone => "is not a valid phone number", :ip_address => "is not a valid IP address", :ssn => "is not a valid social security number", :hex_color => "is not a valid hex color" } end end extend self def message(message) Messages.hash[message.to_s.downcase.to_sym] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
validates_formatting_of-0.3.5 | lib/validates_formatting_of/validation_messages.rb |