projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc90883
)
Accept numbers in plugin names
author
Chocobozzz
<me@florianbigard.com>
Thu, 30 Apr 2020 14:32:24 +0000
(16:32 +0200)
committer
Chocobozzz
<chocobozzz@cpy.re>
Mon, 4 May 2020 14:21:39 +0000
(16:21 +0200)
server/helpers/custom-validators/plugins.ts
patch
|
blob
|
history
diff --git
a/server/helpers/custom-validators/plugins.ts
b/server/helpers/custom-validators/plugins.ts
index 5a4531f72ebdea684bdddcb105276d2c0497639f..d2fc0393623012de00ecf12b612586c580a0bd9a 100644
(file)
--- a/
server/helpers/custom-validators/plugins.ts
+++ b/
server/helpers/custom-validators/plugins.ts
@@
-14,7
+14,7
@@
function isPluginTypeValid (value: any) {
function isPluginNameValid (value: string) {
return exists(value) &&
validator.isLength(value, PLUGINS_CONSTRAINTS_FIELDS.NAME) &&
- validator.matches(value, /^[a-z-]+$/)
+ validator.matches(value, /^[a-z-
0-9
]+$/)
}
function isNpmPluginNameValid (value: string) {