Skip to content

Commit

Permalink
add validator for internal link URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
indirectlylit committed Oct 4, 2023
1 parent ab03c5e commit 2b50056
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/common/DocsInternalLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
href: {
type: String,
required: true,
validator(value) {
return value.startsWith('/') || value.startsWith('#');
},
},
text: {
type: String,
Expand Down

0 comments on commit 2b50056

Please sign in to comment.