newtondev / mrz-parser

Parses the MRZ found of Passport and Travel Documents and returns the data in a human readable form.
MIT License
44 stars 16 forks source link

accept length != 88 #2

Closed FredericHeem closed 7 years ago

FredericHeem commented 8 years ago

The data provided by the an OCR library doesn't always return the correct length, this PR removes the strictness of having a fixed size.

codecov-io commented 8 years ago

Current coverage is 100.00%

Merging #2 into master will not affect coverage as of b6f2d07

@@            master      #2   diff @@
======================================
  Files            1       1       
  Stmts          368     368       
  Branches         0       0       
  Methods          0       0       
======================================
  Hit            368     368       
  Partial          0       0       
  Missed           0       0       

Review entire Coverage Diff as of b6f2d07

Powered by Codecov. Updated on successful CI builds.

newtondev commented 8 years ago

Hi @FredericHeem ,

Thanks for your interest in the library and also your PR. With regards to removing the length constraint, what was your reason behind this? The parsing will fail if the length is not 88 as by the MRZ spec for validation this needs to be there including the padded characters.