Validates As Phone plugin

Plugin details

Validates a US telephone number with or without area code, and without regard to the different input formats. ( e.g. (xxx)xxx-xxxx or xxx.xxx.xxxx or xxx-xxx-xxxx )

Websitehttp://www.indierockmedia.com Repositoryhttp://validates-as-phone.googlecode.com/svn/trunk/ Author Jerrod Blavos Tags validation, phone, model LicenseRuby's (MIT)

Documentation

Install the plugin:
ruby script/plugin install http://validates-as-phone.googlecode.com/svn/trunk/
class Model < ActiveRecord::Base
  ...
  validates_as_phone :telephone, :fax,
                      :message => "is not a valid US phone number"
  ...
end


Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | Back in time (1 older version) | Last edited by: scott, 4 months ago