Telerik Forums
Kendo UI for jQuery Forum
0 answers
147 views

Hi

I've been playing around with the barcodes widget and I've noticed some confusing behaviour on the examples available.

I initially used the cheese example with some valid barcodes and noticed that entering an EAN13 in its full 13 digits causes an error and fails to show any barcodes. Using https://demos.telerik.com/kendo-ui/barcode/index if you change the code for the first item (Manchego) and change it to EAN13 and then enter a valid EAN13 (eg 9300657234720) it not only shows no barcode but also obliterates all of the following barcodes. If you remove the check digit (the last digit) then everything works.

I then found the API example https://demos.telerik.com/kendo-ui/barcode/api where I worked out what is happening. The Kendo widget is accepting ONLY the first 12 digits and then calculating the check digit for itself. So entering 

930065723472

will generate a valid barcode and will correctly calculate the check sum as 0.

However this means that the security of the checksum is stripped out meaning that if an end user manually types the example 

9300657234720

without the checksum  so

930065723472

but makes a transposition error with the last 7 with the last 4 to 

930065723742

then it will still generate a valid barcode 

930065723742 4

However the original barcode is for baked beans and the erroneously created barcode does not exist as a product.

Further if the original barcode is checked in its entirety but has the transposition error with the 4 and the 7 with the checksum 0 then this error would be caught https://barcode.tec-it.com/en/EAN13?data=9300657237420

So, my question is how do I use the Barcode widget and a full EAN13 with check digit to ensure that data entered is correct and that the barcode being generated is for baked beans not non existent products?

Sean
Top achievements
Rank 1
 updated question on 18 Aug 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?