Skip to content

Commit

Permalink
update prettier config
Browse files Browse the repository at this point in the history
  • Loading branch information
hosmelq committed Sep 23, 2019
1 parent c13e1d0 commit 6e1632f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"singleQuote": true,
"bracketSpacing": false,
"parser": "babel",
"semi": false
"parser": "babel"
}
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export const dnic = dni => {
// ([0-6][0-9]{2})-([0-2][0-9]|3[0-1])(0[1-9]|1[0-2])([0-9]{2})-([0-9]{4}[A-X])
const regex = /([0-6][d]{2})-([0-2][d]|3[0-1])(0[1-9]|1[0-2])([d]{2})-([d]{4}[A-X])/
const regex = /([0-6][d]{2})-([0-2][d]|3[0-1])(0[1-9]|1[0-2])([d]{2})-([d]{4}[A-X])/;

return regex.test(dni)
}
return regex.test(dni);
};

export const dnicWithDateValidation = dni => {
if (!dni) {
return null
return null;
}
}
};

0 comments on commit 6e1632f

Please sign in to comment.