1
0
Fork 0

Accept numbers in plugin names

This commit is contained in:
Chocobozzz 2020-04-30 16:32:24 +02:00 committed by Chocobozzz
parent bc90883f1a
commit 5644f9b035

View file

@ -14,7 +14,7 @@ function isPluginTypeValid (value: any) {
function isPluginNameValid (value: string) { function isPluginNameValid (value: string) {
return exists(value) && return exists(value) &&
validator.isLength(value, PLUGINS_CONSTRAINTS_FIELDS.NAME) && validator.isLength(value, PLUGINS_CONSTRAINTS_FIELDS.NAME) &&
validator.matches(value, /^[a-z-]+$/) validator.matches(value, /^[a-z-0-9]+$/)
} }
function isNpmPluginNameValid (value: string) { function isNpmPluginNameValid (value: string) {