Munthir-Muh / Egyptian-National-Id-Extractor-and-Validation

Validate and Extract segments information from Egyptian national id number using C#

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NationalIdExtractor

The National Id Extraction library helps to validate and extract data from national id like:

  • Birth Date
  • Governorate
  • Gender

the validation is based on egyption national id segmentation that discribed in this link.

Documentation:

NationalIdExtractor:

The main class is NationalIdExtractor that can be instantiate as the following:

  • using the prameterless constractor, in this case it will use the default INationalIdResourceProvider implementation.
  • providing a custom INationalIdResourceProvider implementation.

Then you can call Extract method and passing to it the national Id number you want to extract and validate.

INationalIdResourceProvider:

this interface should be implemented if you want to customize the validation message (change language as an example) and the governorate or you have this resources in a different provider like (database or json file..etc).

there is NationalIdResourcesDefaultProvider which is the default implementation that i have create it as an example and to be ready to use.

NationalIdExtractorPresentation:

NationalIdExtractorPresentation is a console project to demonstrate how we can use this library using two scenarios :

  • using the default INationalIdResourceProvider implementation.
  • using custom INationalIdResourceProvider implementation which is NationalIdResourcesArabicProvider that have an arabic impelementation and you can do your own implementation to target a different sources with different langages.

If you have any suggestions to improve my code and techniques, please let me know. Your feedback would be highly appreciated.

About

Validate and Extract segments information from Egyptian national id number using C#


Languages

Language:C# 100.0%