Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
Add minimum tracking number length
Browse files Browse the repository at this point in the history
  • Loading branch information
moollaza committed Jul 14, 2016
1 parent c66076d commit 14a46e3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/DDG/Spice/PackageTracking.pm
Expand Up @@ -24,8 +24,10 @@ handle remainder_lc => sub {
s/\b$carriers_re\b//g;
trim($_);
# remainder should be numeric or alphanumeric, not alpha
return if m/^[a-z]+$/;
return unless m/^[a-z0-9\-]+$/;
return if m/^[a-z\s]+$/;
# ignore us zipcodes
return if m/^[0-9]{5}+$/;
return unless m/^[a-z0-9\-]{6,}$/;
return $_;
};

Expand Down

0 comments on commit 14a46e3

Please sign in to comment.