Updated


On 13 Nov 2013, at 16:06, Sean Dunn <notifications@github.com> wrote:

> In app/scripts/lib/barcode_checker.js:
> 
> > @@ -13,7 +13,7 @@ define(['config'], function (config) {
> >    $.extend(BarcodeChecker,
> >        {
> >          isBarcodeValid:           function (barcode, barcodePrefixes) {
> > -          return /^\d{13}$/.exec(barcode) !== null && checkPrefix(barcode, barcodePrefixes);
> > +          return (/^\d{13}$/.exec(barcode) !== null || /^\d{12}$/.exec(barcode)!== null) && checkPrefix(barcode, barcodePrefixes);
> You can use a range {12,13} in the regex instead of the || statement.
> 
> return (/^\d{12,13}$/.exec(barcode) !== null
> —
> Reply to this email directly or view it on GitHub.
>