Fix parse cardType bug and add tests for the validate mixin

Fixes #118 and adds tests for the validate mixin. CC: @chrissrogers