summaryrefslogtreecommitdiffstats
path: root/lib/contact.rb
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2017-10-02 16:58:54 +0200
committerHarald Eilertsen <haraldei@anduin.net>2017-10-02 16:58:54 +0200
commitd91338c647ef511d55a6be7493fca950a0c5fb46 (patch)
treea39530f6be63bc7ab535f3f3e654249d217de70c /lib/contact.rb
parent1bce43d6a51ee09631f55cf427a2e110d901ecb2 (diff)
downloadnorsk-urskog-registrations-d91338c647ef511d55a6be7493fca950a0c5fb46.tar.gz
norsk-urskog-registrations-d91338c647ef511d55a6be7493fca950a0c5fb46.tar.bz2
norsk-urskog-registrations-d91338c647ef511d55a6be7493fca950a0c5fb46.zip
Fix regexp for validating phone numbers.
Diffstat (limited to 'lib/contact.rb')
-rw-r--r--lib/contact.rb2
1 files changed, 1 insertions, 1 deletions
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