Metron-Project / metron

Django website for a comic book database
https://metron.cloud/
GNU General Public License v3.0
90 stars 7 forks source link

Issue ISBN field does not accept the character `X` #279

Closed RogueBurger closed 3 weeks ago

RogueBurger commented 1 month ago

Describe the bug The ISBN field in the issue create form (https://metron.cloud/issue/create/) seems to be set up to only allow numbers, and throws a validation error when the letter X is included.

To Reproduce Steps to reproduce the behavior:

  1. Go to (https://metron.cloud/issue/create/)
  2. Fill the ISBN field with 087135814X
  3. Fill all other required field with valid data and submit
  4. See error

Expected behavior The ISBN-10 standard allows for X to be in the last digit, and there are real comics that have an X in that spot. So the expect behavior should be to allow ISBNs containing an X in the final digit to be submitted.

Screenshots Here is an example of a comic with an X in its ISBN (Adventures of Captain America (1991) 4): Screenshot 2024-10-01 190427

And here's the error when trying to submit: Screenshot 2024-10-01 190658

Additional context Here's some info on why that digit can be an X: https://en.wikipedia.org/wiki/ISBN#ISBN-10_check_digits

bpepple commented 4 weeks ago

Was wondering if this was ever going to show up. Well, it's easy enough to fix just need to find some time.