Skip to content

C# Validate Article Numbers ASIN, EAN8, EAN13, GTIN, ISBN, ISBN13, SKU, UPC

License

Notifications You must be signed in to change notification settings

nager/Nager.ArticleNumber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nager.ArticleNumber

  • Validate article numbers (EAN8, EAN13, GTIN, ISBN10, ISBN13, ISSN, UPC, ASIN).
  • Detect the article number type of a given code

nuget

The package is available on nuget

PM> install-package Nager.ArticleNumber

Examples

Detect article number type

var articleNumberType = ArticleNumberHelper.GetArticleNumberType("4002515289693");
if (articleNumberType == ArticleNumberType.EAN13)
{
    //print barcode
}

Validate article number

var isIsbn = ArticleNumberHelper.IsValidIsbn10("3551559015");
if (isIsbn)
{
    //buy book
}