Class: Valideez::Phone
- Includes:
- Common
- Defined in:
- lib/valideez/phone.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(val, options = {}) ⇒ Phone
constructor
A new instance of Phone.
Methods included from Common
#validate_format, #validate_length
Methods inherited from Base
Constructor Details
#initialize(val, options = {}) ⇒ Phone
Returns a new instance of Phone.
5 6 7 8 9 10 11 12 |
# File 'lib/valideez/phone.rb', line 5 def initialize(val, = {}) super val assign({ :mobile => false, :format => /\A\d{9}\Z/, }.merge()) end |