Validates As PhoneValidates 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 )
class Model < ActiveRecord::Base
validates_as_phone :telephone, :fax,
:message => "is not a valid US phone number"
These details are provided for information only. No information here is legal advice and should not be used as such.