diff options
author | Chocobozzz <me@florianbigard.com> | 2020-04-30 16:32:24 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-05-04 16:21:39 +0200 |
commit | 5644f9b0351c71601312b13c49d89b0ce05c74e3 (patch) | |
tree | ab31bae90584dfdb995c7aa6141face42175103b /server/helpers/custom-validators | |
parent | bc90883f1a5e9c4ecb76ae358734b85be515af7f (diff) | |
download | PeerTube-5644f9b0351c71601312b13c49d89b0ce05c74e3.tar.gz PeerTube-5644f9b0351c71601312b13c49d89b0ce05c74e3.tar.zst PeerTube-5644f9b0351c71601312b13c49d89b0ce05c74e3.zip |
Accept numbers in plugin names
Diffstat (limited to 'server/helpers/custom-validators')
-rw-r--r-- | server/helpers/custom-validators/plugins.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/helpers/custom-validators/plugins.ts b/server/helpers/custom-validators/plugins.ts index 5a4531f72..d2fc03936 100644 --- a/server/helpers/custom-validators/plugins.ts +++ b/server/helpers/custom-validators/plugins.ts | |||
@@ -14,7 +14,7 @@ function isPluginTypeValid (value: any) { | |||
14 | function isPluginNameValid (value: string) { | 14 | function isPluginNameValid (value: string) { |
15 | return exists(value) && | 15 | return exists(value) && |
16 | validator.isLength(value, PLUGINS_CONSTRAINTS_FIELDS.NAME) && | 16 | validator.isLength(value, PLUGINS_CONSTRAINTS_FIELDS.NAME) && |
17 | validator.matches(value, /^[a-z-]+$/) | 17 | validator.matches(value, /^[a-z-0-9]+$/) |
18 | } | 18 | } |
19 | 19 | ||
20 | function isNpmPluginNameValid (value: string) { | 20 | function isNpmPluginNameValid (value: string) { |