Permalink
Browse files

fixed PostNet barcodes

  • Loading branch information...
1 parent 8936d64 commit b20292fe4c7f071eafbb12f6b81673fa06062ef6 @Gemorroj committed Mar 5, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 Image/Barcode2/Postnet.php
@@ -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';
/**
@@ -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');
}
}

0 comments on commit b20292f

Please sign in to comment.