Skip to content

Commit

Permalink
[wip]
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgriffiniii committed Jul 8, 2022
1 parent 30383d6 commit b41b1a6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/javascript/packs/orcid.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

import { isOrcid } from './orcid'

export function isOrcid(value) {
function isOrcid(value) {
console.log(value)
// Notice that we allow for an "X" as the last digit.
// Source https://gist.github.com/asencis/644f174855899b873131c2cabcebeb87
return /^(\d{4}-){3}\d{3}(\d|X)$/.test(value)
};

window.isOrcid = isOrcid;

export { isOrcid };

0 comments on commit b41b1a6

Please sign in to comment.