summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-10-20 20:42:46 -0700
committerIvan Kohler <ivan@freeside.biz>2013-10-20 20:42:46 -0700
commit3d6444ea027fe5e67962388faadb162de5db8de1 (patch)
tree4a9725752da0ea9dbeaa8e6902c599a5bea8c982 /FS
parent4e9e8e5c0c44815ee77d92a5a1034df52b88fafa (diff)
strip non-digits from contact_phone.phonenum, RT#24052
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/contact_phone.pm6
1 files 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<FS::Record>, schema.html from the base documentation.