feat: update valid_phone_number method to allow phone numbers with 9 to 15 digits

lab2
Artem-Darius Weber 4 weeks ago
parent c222d7bdd0
commit d0279bf2e9

BIN
.DS_Store vendored

Binary file not shown.

@ -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?

Loading…
Cancel
Save