diff options
Diffstat (limited to 'FS/FS/svc_phone.pm')
-rw-r--r-- | FS/FS/svc_phone.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm index c90339a8b..c356344dd 100644 --- a/FS/FS/svc_phone.pm +++ b/FS/FS/svc_phone.pm @@ -179,8 +179,14 @@ and replace methods. sub check { my $self = shift; + my $conf = new FS::Conf; + my $phonenum = $self->phonenum; - $phonenum =~ s/\D//g; + if ( $conf->exists('svc_phone-allow_alpha_phonenum') ) { + $phonenum =~ s/\W//g; + } else { + $phonenum =~ s/\D//g; + } $self->phonenum($phonenum); my $error = |