PrycilaCerqueira / P7_UrbanRead

UrbanRead is an online library for those who enjoy a good time!
0 stars 0 forks source link

ISBN inconsistent datatypes? #4

Closed f-rakete closed 1 year ago

f-rakete commented 1 year ago

https://github.com/PrycilaCerqueira/P7_UrbanRead/blob/bd65ed044cc0eef1251684e36f8b9064903371cb/P7_UrbanRead/P7_UrbanRead/ISBN.cs#L12-L24

I'm not certain about ISBNs, but why is the isbn10 a string and 13 an int?

thre is also a checksum in the ISBN format, you might want to validate the actual number itself

PrycilaCerqueira commented 1 year ago

Adjusted datatypes

PrycilaCerqueira commented 1 year ago

https://github.com/PrycilaCerqueira/P7_UrbanRead/blob/91a2e1c2a18ad319b435d0e10b5254f801233d7b/P7_UrbanRead/P7_UrbanRead/FuncHelp.cs#LL43C10-L43C10

I am keeping both ISBN format options based on the article

"ISBN-10 and ISBN-13 indicate how many digits are in the ISBN and are two separate systems for identifying books. Before 2007, there were only 10-digit ISBNs; thereafter, 13-digit ISBNs were introduced and used to increase the availability of ISBNs worldwide." BookScouter

“To date, 13-digit ISBNs assigned by the U.S. ISBN Agency include the 978 prefixes, which allowed systems to contain both 10- and 13-digit ISBNs for all books. However, a 13-digit ISBN starting with 979 does not have an equivalent 10-digit ISBN.” ISBN.org