Coder Social home page Coder Social logo

idparser's Introduction

ID Parser

Build Status

ID Parser can be used to parse AAMVA-compliant driver's licenses and ID cards into objects that you can work with. More information on the versions of the AAMVA standard can be found here. More information on the D20 Data Dictionary can be found here.

Usage

  1. Include the using
using IdParser;
  1. Then you're off to the races!
var idCard = Barcode.Parse(barcode);
Console.WriteLine(idCard.Address.StreetLine1); // "123 NORTH STATE ST."
Console.WriteLine(idCard.IssuerIdentificationNumber.GetDescription()); // "New York"

if (idCard is DriversLicense license)
{
    Console.WriteLine(license.Jurisdiction.VehicleClass); // "C"
}

More Examples

Take a look at the unit test project for more examples and usage.

Client

The IdParser.Client project is a handy GUI application to help test and verify that an ID will be parsed correctly. The app works with both OPOS and HID keyboard emulation scanners.

FAQ

  • I can't build IdParser.Client. It's missing a required dependency. You need to have Microsoft POS for .NET installed. The Microsoft.PointOfService dll is GAC'd and will allow you to build and run the client app.

  • The Height class has the wrong TotalInches or Centimeters. The AAMVA standard has no decimal places in the height subfile record. As a result, the conversion between inches and centimeters will be off.

  • The library is throwing ArgumentExcpetions for every barcode I'm passing in. By default, all barcodes are parsed using the Strict validation level. All barcodes are expected to adhere exactly to the AAMVA standard as defined in the PDFs for parsing to succeed. This is the recommended level for scanners using OPOS. However, if HID keyboard emulation is used, especially when scanning using a web browser, the expected data can become malformed. You can try using the None validation level, however this is not guaranteed to work in all cases. Data elements may be skipped and exceptions may still be thrown.

Find IDs Not in Tests Regex

DAJ(?!(AL|AR|AZ|AK|CA|CO|CT|DE|FL|GA|HI|IA|ID|IL|IN|KS|KY|LA|MA|MD|ME|MI|MN|MO|MS|MT|NC|ND|NH|NJ|NM|NV|NY|OH|ON|OR|PA|PE|PR|RI|SC|TN|TX|UT|VA|VT|WA|WI|WV|QC|OK|NS|NE|NB|AB|SD|DC))[A-Z]+

idparser's People

Contributors

c0shea avatar

Watchers

James Cloos avatar Matt Daniel Brown avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.