Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type ean 13 error #212

Open
xorgxx opened this issue Jan 30, 2025 · 0 comments
Open

Type ean 13 error #212

xorgxx opened this issue Jan 30, 2025 · 0 comments

Comments

@xorgxx
Copy link

xorgxx commented Jan 30, 2025

Hi,

So, there’s no built-in validation for this? Currently, I’m using Turbo Stream to render a table that includes barcodes. I have a form where users can add a barcode of type EAN-13.

For example:

  • If I enter 2004770027357, everything works fine.
  • But if I enter 2004770027358, the app crashes, and Turbo Stream fails to render, showing an error. In the debug info, there is no form validation error !!

My question is:
Should I manually validate the barcode in the controller before committing it to the database, or does the database throw an exception on commit?

Thanks for your help!

Originally posted by @xorgxx in #180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant