Skip to content

Commit

Permalink
Release v0.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
cheminfo-bot committed Jan 20, 2017
1 parent d3bb8fd commit 16437ff
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions dist/mrz.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ return /******/ (function(modules) { // webpackBootstrap
return {
ifValid: checkResult,
source,
value: (checkResult) ? 'valid' : 'non valid',
label: 'Global check digit',
error
};
Expand Down Expand Up @@ -297,7 +298,7 @@ return /******/ (function(modules) { // webpackBootstrap
var result = {
source,
label: 'Document number',
value: source,
value: source.replace(/<*$/, ''),
error: []
};
if (!check(source, checkDigit)) {
Expand Down Expand Up @@ -637,8 +638,8 @@ return /******/ (function(modules) { // webpackBootstrap
var check = __webpack_require__(5);

module.exports = function parseExpirationDate(value, checkDigit) {
var result = parseText('Personal number', value, /^[A-Z<]+<*$/);
if (!check(value, checkDigit)) {
var result = parseText('Personal number', value, /^[A-Z0-9<]+<*$/);
if (checkDigit && !check(value, checkDigit)) {
result.error.push('Check digit "' + checkDigit + '" not valid');
}
return result;
Expand Down
Loading

0 comments on commit 16437ff

Please # to comment.