diff --git a/modules/structs/repo.go b/modules/structs/repo.go index 765546a5aa..8146166465 100644 --- a/modules/structs/repo.go +++ b/modules/structs/repo.go @@ -143,7 +143,7 @@ type CreateRepoOption struct { // Gitignores to use Gitignores string `json:"gitignores"` // License to use - License string `json:"license"` + License string `json:"license" binding:"MaxSize(100)"` // Readme of the repository to create Readme string `json:"readme"` // DefaultBranch of the repository (used when initializes and in template) diff --git a/services/forms/repo_form.go b/services/forms/repo_form.go index 765a723968..956329f480 100644 --- a/services/forms/repo_form.go +++ b/services/forms/repo_form.go @@ -28,7 +28,7 @@ type CreateRepoForm struct { AutoInit bool Gitignores string IssueLabels string - License string + License string `binding:"MaxSize(100)"` Readme string Template bool