Skip to content

Commit

Permalink
Use regex from share to validate doi in preprint add page
Browse files Browse the repository at this point in the history
  • Loading branch information
caneruguz committed Oct 18, 2016
1 parent 349d201 commit 9b94832
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const BasicsValidations = buildValidations({
validators: [
validator('format', {
// Simplest regex- try not to diverge too much from the backend
regex: /^10\.\S+\//,
regex: /\b(10\.\d{4,}(?:\.\d+)*\/\S+(?:(?!["&\'<>])\S))\b/,
allowBlank: true,
message: 'Please use a valid {description}'
})
Expand Down

0 comments on commit 9b94832

Please sign in to comment.