Module: ActiveRecord
- Defined in:
- lib/validates_as_phone_number.rb
Overview
Validation helper for ActiveRecord derived objects that cleanly and simply allows the model to check if the given string is a valid US phone number in the form 000-000-0000, 000-0000 (delimiter may be space, hyphen or period and area code can have parentheses). For extensions: 000-000-0000 x12345 or 000-0000 x1234567 Extensions can be up to 7 digits (valid with or without leading space before ‘x’)
Defined Under Namespace
Modules: Validations