diff --git a/model/manifest.go b/model/manifest.go index 9b1551e921..9c5047a887 100644 --- a/model/manifest.go +++ b/model/manifest.go @@ -364,8 +364,9 @@ func (s *PluginSetting) isValid() error { pluginSettingType == Text || pluginSettingType == LongText || pluginSettingType == Number || - pluginSettingType == Username) { - return errors.New("should not set Placeholder for setting type not in text, generated or username") + pluginSettingType == Username || + pluginSettingType == Custom) { + return errors.New("should not set Placeholder for setting type not in text, generated, number, username, or custom") } if s.Options != nil { diff --git a/model/manifest_test.go b/model/manifest_test.go index de93569b53..8f42ab5f4b 100644 --- a/model/manifest_test.go +++ b/model/manifest_test.go @@ -184,6 +184,13 @@ func TestSettingIsValid(t *testing.T) { }, false, }, + "Placeholder is allowed for custom settings": { + PluginSetting{ + Type: "custom", + Placeholder: "some Text", + }, + false, + }, } { t.Run(name, func(t *testing.T) { err := test.Setting.isValid()