Skip to content

Commit 80371b2

Browse files
authored
Merge pull request #2008 from okppop/dev-281
fix: add new rule to verify package name
2 parents 3119c62 + e6543a6 commit 80371b2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: web/src/view/systemTools/autoPkg/autoPkg.vue

+2
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@
123123
callback(new Error('不能为中文'))
124124
} else if (/^\d+$/.test(value[0])) {
125125
callback(new Error('不能够以数字开头'))
126+
} else if (!/^[a-zA-Z0-9_]+$/.test(value)) {
127+
callback(new Error('只能包含英文字母、数字和下划线'))
126128
} else {
127129
callback()
128130
}

0 commit comments

Comments
 (0)