diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..bda1588 Binary files /dev/null and b/.DS_Store differ diff --git a/lab2/contact.rb b/lab2/contact.rb index 89cb1d5..ec032c0 100644 --- a/lab2/contact.rb +++ b/lab2/contact.rb @@ -10,8 +10,9 @@ class Contact def valid_phone_number? return true if @phone.nil? - - /\A\+?[0-9]{10,15}\z/.match?(@phone) + + # Разрешить от 9 до 15 цифр + /\A\+?[0-9]{9,15}\z/.match?(@phone) end def valid_telegram?