From 275ce0155bd34829ee97b3f0ca48228ca3c5daca Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sun, 20 Oct 2013 20:42:45 -0700 Subject: [PATCH] strip non-digits from contact_phone.phonenum, RT#24052 --- FS/FS/contact_phone.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FS/FS/contact_phone.pm b/FS/FS/contact_phone.pm index ad8e8f737..55cb09dc3 100644 --- a/FS/FS/contact_phone.pm +++ b/FS/FS/contact_phone.pm @@ -124,6 +124,10 @@ sub check { ; return $error if $error; + #strip non-digits, UI should format numbers per countrycode + (my $phonenum = $self->phonenum ) =~ s/\D//g; + $self->phonenum($phonenum); + $self->SUPER::check; } @@ -131,8 +135,6 @@ sub check { =head1 BUGS -The author forgot to customize this manpage. - =head1 SEE ALSO L, schema.html from the base documentation. -- 2.11.0