Validating barcodes

Today I promoted a new component into ZF’s core.


You think it did already exist? Yes, and no. Let’s clearify a little bit.
The old implementation of Zend_Validate_Barcode did not work properly. It was fixed to EAN13 and UPCA and very limited.

I reworked it completly, added new features and a easy API.
It is now a base component for Zend_Barcode, a new component which provides you with the ability to print barcodes.

So what are the new features of Zend_Validate_Barcode?

  • Adapter support: Each barcode type is now an adapter. This means it is easy to add new barcodes, and you can also provide new barcode types yourself
  • 12 new standards: Now 12 new barcode standards are supported. So we have 14 types which you can work with. New ones will be added as they are needed. As we see no benefit of adding all 200 known standards at once, this may be the better way ;-)
  • Select checksum validation: You can now select if a checksum should be validated when your barcode gives one
  • Improved validation: The validation has been improved. A check for the used character tables has been added
  • Barcode types: Now also validation of 2D (or even 3D) types is possible

And as said, Zend_Validate_Barcode is the base for Zend_Barcode. This component, written by a good fellow of mine, allows to print barcodes for example within a PDF document, or within images.

So now you can make professional documents (including barcodes within the document).
This is really important for a invoice.

Enough for now… when you want to know more look into the manual. The validator works like all other validators. So you will not see any difference.

Have fun with Zend Framework

Thomas Weidner
I18N Team Leader, Zend Framework

Zend Framework Advisory Board Member
Zend Certified Engineer for Zend Framework

Back to top