Skip to content

Commit

Permalink
feat: added validation for Pancard and lint error solved
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulnikam2002 committed Sep 24, 2023
1 parent 6f2f41c commit d754097
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lib/isPancard.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import assertString from "./util/assertString";
import assertString from './util/assertString';

/**
* Check if str is a valid pan card number
*
* @param {string} str
* @return {boolean}
*/
export default function isPancard(str) {
assertString(str);
const pancardRegex = /^[A-Z]{5}[0-9]{4}[A-Z]$/;
Expand Down

0 comments on commit d754097

Please sign in to comment.