Skip to content

AAMVA v0 and V1 issues #1

Description

@ericcumbee

Hello,
I've been working on js parser for AAMVA as well. I found your's with great interest. I just wanted to let you know about a couple things.

V0 and V1 of the spec do not have a Jurisdictional Version number which throws the regex off.

i've started playing around with your code and what i am doing to solve that is grab the AAMVA Version number using substring (should be in the same place in all versions of the spec.) and using a different regex for v0/1 and then one for all of the other versions.

to further complicate that South Carolina that uses either v0 or v1 has an off by one error that has to be accounted for in parsing the subfiles.

Also some states instead of ANSI for the file type indicator use AAMVA.

and some states use \x1c instead of \x1e for the record separator.

i've been playing around with your regex (first time really using regex though) and it should be able to parse out the subfiles for V0/1
m = data.match(/^@\n\u001e|\x1c\r(ANSI |AAMVA )(\d{6})(\d{2})(\d{2})/);

Also i see you started implementing date parsing. Just a heads up even though the spec says to encode the dates in a certain format not all states follow that.

this repo https://github.com/ant512/DLID is a bit dated but the comments do a pretty good job of explaining the warts on the implementation of the spec.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions