diff --git a/internal/http/request/container_image.go b/internal/http/request/container_image.go index f3c4aae862..4bebd9cef5 100644 --- a/internal/http/request/container_image.go +++ b/internal/http/request/container_image.go @@ -7,6 +7,6 @@ type ContainerImageID struct { type ContainerImagePull struct { Name string `form:"name" json:"name" validate:"required"` Auth bool `form:"auth" json:"auth"` - Username string `form:"username" json:"username" validate:"requiredIf=Auth,true"` - Password string `form:"password" json:"password" validate:"requiredIf=Auth,true"` + Username string `form:"username" json:"username" validate:"requiredIf:Auth,true"` + Password string `form:"password" json:"password" validate:"requiredIf:Auth,true"` } diff --git a/internal/http/request/cron.go b/internal/http/request/cron.go index 454052e304..c55f556984 100644 --- a/internal/http/request/cron.go +++ b/internal/http/request/cron.go @@ -5,7 +5,7 @@ type CronCreate struct { Type string `form:"type" json:"type" validate:"required"` Time string `form:"time" json:"time" validate:"required|cron"` Script string `form:"script" json:"script"` - BackupType string `form:"backup_type" json:"backup_type" validate:"requiredIf=Type,backup"` + BackupType string `form:"backup_type" json:"backup_type" validate:"requiredIf:Type,backup"` BackupPath string `form:"backup_path" json:"backup_path"` Target string `form:"target" json:"target" validate:"required"` Save int `form:"save" json:"save" validate:"required"`