feat : Validate bark, ntfy, generic+ shortcut (#591)

Former-commit-id: da22074ed3
This commit is contained in:
Owen Valentine 2023-11-16 04:53:06 +02:00 committed by GitHub
parent 13c437c418
commit ab98870350

View file

@ -13,6 +13,7 @@ func init() {
err := validate.RegisterValidation("shoutrrr", func(fl validator.FieldLevel) bool {
prefixes := [...]string{
"bark://",
"discord://",
"smtp://",
"gotify://",
@ -21,6 +22,7 @@ func init() {
"join://",
"mattermost://",
"matrix://",
"ntfy://",
"opsgenie://",
"pushbullet://",
"pushover://",
@ -30,6 +32,7 @@ func init() {
"telegram://",
"zulip://",
"generic://",
"generic+",
}
str := fl.Field().String()