-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Hello.
I think the ".valid?" method is not accurate.
as I can see it's only checking simple regexp isbn.match(/^[0-9]{13}$/) and checksum
It doesn't work well for many ISBNs, for example 8830114722800 - it is mark as valid but it is not:
https://isbnsearch.org/search?s=8830114722800
For now I can use workaround:
if lisbn.parts.nil? && lisbn.parts(4).nil?
then it is invalid.
I would like to look around for proper ISBN validation rules, and use it in ".valid?" method. I will do the research.
Metadata
Metadata
Assignees
Labels
No labels