From: ivan Date: Sun, 6 Mar 2011 17:47:53 +0000 (+0000) Subject: strip non-digits from phone numbers instead of throwing a nasty error, on dsl qualifi... X-Git-Tag: freeside_2_3_0~527 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=40c8254edff1e92cc5d6fe4abd4e248222f28f28 strip non-digits from phone numbers instead of throwing a nasty error, on dsl qualifications w/ spaces or dashes, RT#7111 --- diff --git a/httemplate/edit/process/qual.cgi b/httemplate/edit/process/qual.cgi index 5a4f68be3..bc8c5a5fd 100644 --- a/httemplate/edit/process/qual.cgi +++ b/httemplate/edit/process/qual.cgi @@ -37,7 +37,9 @@ die "neither prospect nor customer specified or found" $cgi->param('exportnum') =~ /^(\d+)$/ or die 'illegal exportnum'; my $exportnum = $1; -$cgi->param('phonenum') =~ /^(\d*)$/ or die 'illegal phonenum'; +my $phonenum = $cgi->param('phonenum'); +$phonenum =~ s/\D//g; +$phonenum =~ /^(\d*)$/ or die 'illegal phonenum'; my $phonenum = $1; $cgi->param('locationnum') =~ /^(\-?\d*)$/