Hi Experts,
I am finding that during Barcode Generation - InvalidCodeException is not getting triggered even when I enter invalid data. I would like to perform a form validation to see if the user has typed a valid code text for Barcode generation and report immediately before really going for Barcode generation.
Currently even if enter special characters @^#%^#%, that too goes through fine without reporting any error. I have also tried following the exact code that is mentioned at <a href="https://forum.aspose.com/t/26881 and that too didn’t work.
I am using Aspose.BarCode_5.4.0 version for .Net 3.5 Framework.
Any prompt help would be highly appreciated as I am working on a time critical project.
Regards,
Joseph
Hi Joseph,
Thank you for contacting support. First off, please note that each new release contains many improvements, bug fixes and new features. So we always recommend our customers use the latest version of Aspose APIs. You can evaluate the latest version of Aspose.BarCode 6.0.0.
Please refer to the download page here:
Based on your inquiry, could you please share a few sample source codes along with symbology types? It will help us to be more specific.
Hi Imran,
Thanks for your prompt response. Unfortunately our license is valid only until the version I had mentioned.
Regarding sample code, the same code present in URL mentioned in my initial post itself doesn’t work; even for simplest barcode 3 of 9, it accepts special characters.
Please advise.
Regards,
Joseph
Hi Joseph,
Thank you for your inquiry. It looks like it accepts special characters, but actually prefilters code text before generation. I mean it generates the barcode without special characters and do not throw an exception regarding invalid code text. I recommended its latest version because BarCodeBuilder class holds ThrowExceptionWhenCodeTextIncorrect property. Please take a look over helping example topic here:
You can learn all about how Aspose APIs are licensed by checking out the Licenses FAQ here:
Please do let me know in case of any confusion or questions.