Skip to content

Commit

Permalink
fixed PostNet barcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemorroj committed Mar 5, 2012
1 parent 8936d64 commit b20292f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Image/Barcode2/Postnet.php
Expand Up @@ -38,6 +38,7 @@

require_once 'Image/Barcode2/Driver.php';
require_once 'Image/Barcode2/Common.php';
require_once 'Image/Barcode2/DualHeight.php';
require_once 'Image/Barcode2/Exception.php';

/**
Expand Down Expand Up @@ -106,7 +107,7 @@ public function __construct(Image_Barcode2_Writer $writer)
public function validate()
{
// Check barcode for invalid characters
if (!preg_match('/^[0-9]$/', $this->getBarcode())) {
if (!preg_match('/^[0-9]+$/', $this->getBarcode())) {
throw new Image_Barcode2_Exception('Invalid barcode');
}
}
Expand Down

0 comments on commit b20292f

Please sign in to comment.