Skip to content

feat: ISBN validation #1097

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ysknsid25
Copy link
Contributor

I am a certified librarian. So I realized that I would like to be able to verify ISBNs when registering books.

The ISBN specifications are here.

Signed-off-by: ysknsid25 <[email protected]>
@Copilot Copilot AI review requested due to automatic review settings March 22, 2025 14:45
Copy link

vercel bot commented Mar 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
valibot ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 24, 2025 9:58am

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces ISBN validation functionality for the library management system, allowing the verification of both ISBN-10 and ISBN-13 formats when registering books. Key changes include adding new validation logic in the ISBN action, comprehensive test cases for the new functionality, and an update to the API menu to expose the ISBN endpoint.

Reviewed Changes

Copilot reviewed 5 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
library/src/actions/isbn/isbn.test-d.ts Adds TypeScript type tests for ISBN action object
library/src/actions/isbn/isbn.test.ts Provides tests for both valid and invalid ISBN datasets
library/src/actions/isbn/isbn.ts Implements the ISBN validation and related documentation
library/src/actions/isbn/index.ts Exports the ISBN action
website/src/routes/api/menu.md Updates API menu to include the new ISBN endpoint
Files not reviewed (3)
  • website/src/routes/api/(actions)/isbn/index.mdx: Language not supported
  • website/src/routes/api/(schemas)/string/index.mdx: Language not supported
  • website/src/routes/guides/(main-concepts)/pipelines/index.mdx: Language not supported

@fabian-hiller
Copy link
Owner

Great idea! Thank you for creating this PR! I will try to review it next week!

Copy link

pkg-pr-new bot commented Mar 23, 2025

Open in Stackblitz

npm i https://pkg.pr.new/valibot@1097

commit: e3c1e98

Signed-off-by: ysknsid25 <[email protected]>
@fabian-hiller
Copy link
Owner

Sorry for the delay. I will get back to this PR as soon as possible.

@ysknsid25
Copy link
Contributor Author

no problem. take it easy 👍

@fabian-hiller fabian-hiller added this to the v1.2 milestone Apr 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants