Skip to content

BB-780 and BB-862: Update Amazon ASIN validation regex and tests#330

Open
faizanakhtar123 wants to merge 1 commit intometabrainz:masterfrom
faizanakhtar123:fix-bb-780-asin-regex
Open

BB-780 and BB-862: Update Amazon ASIN validation regex and tests#330
faizanakhtar123 wants to merge 1 commit intometabrainz:masterfrom
faizanakhtar123:fix-bb-780-asin-regex

Conversation

@faizanakhtar123
Copy link
Copy Markdown

@faizanakhtar123 faizanakhtar123 commented Mar 3, 2026

This PR addresses the backend validation for BB-780.

Update

  • Updated the IDENTIFIER_TYPES validation regex for Amazon ASINs from ^(?:B\d{2}\w{7}|\d{9}[X\d])$ to ^(?:B0[A-Z0-9]{8}|\d{9}[X\d])$.
  • This ensures modern, alphanumeric ASINs (like B0CQKH14BB) are correctly validated.

Note: A companion PR for bookbrainz-site containing frontend test updates and the SQL migration script will be opened shortly.

TESTING


  • I have run the code and manually tested the changes

AI usage


  • I have used AI in this PR (add more details below)
  • I understand all the changes made in this PR

@MonkeyDo MonkeyDo changed the title LB-780 Update Amazon ASIN validation regex and tests BB-780: Update Amazon ASIN validation regex and tests Mar 3, 2026
@faizanakhtar123 faizanakhtar123 changed the title BB-780: Update Amazon ASIN validation regex and tests BB-780 and BB-862: Update Amazon ASIN validation regex and tests Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant