Skip to content

Commit

Permalink
Returning credit card number when is valid, fixes #948
Browse files Browse the repository at this point in the history
  • Loading branch information
chamini2 committed Jul 15, 2016
1 parent 3ca2364 commit 8c84c90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/string.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ internals.String = class extends Any {
}

const check = (sum % 10 === 0) && (sum > 0);
return check ? null : this.createError('string.creditCard', { value }, state, options);
return check ? value : this.createError('string.creditCard', { value }, state, options);
});
}

Expand Down

0 comments on commit 8c84c90

Please sign in to comment.