From d91338c647ef511d55a6be7493fca950a0c5fb46 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Mon, 2 Oct 2017 16:58:54 +0200 Subject: Fix regexp for validating phone numbers. --- lib/contact.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/contact.rb b/lib/contact.rb index 0a7a449..4df29e8 100644 --- a/lib/contact.rb +++ b/lib/contact.rb @@ -57,6 +57,6 @@ class Contact end def valid_phone? - @phone && @phone =~ /^\+*[0-9- ]{8,}$/ + @phone && @phone =~ /^\+*[0-9\- ]{8,}$/ end end -- cgit v1.2.3