Be more lenient with label colors (#17752)

Accept 12-bit color specifications.
This commit is contained in:
Clar Fon 2022-02-07 16:21:02 -05:00 committed by GitHub
parent 3a91f845e8
commit 9911b66aea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 4 deletions

View file

@ -549,7 +549,7 @@ type CreateLabelForm struct {
ID int64
Title string `binding:"Required;MaxSize(50)" locale:"repo.issues.label_title"`
Description string `binding:"MaxSize(200)" locale:"repo.issues.label_description"`
Color string `binding:"Required;Size(7)" locale:"repo.issues.label_color"`
Color string `binding:"Required;MaxSize(7)" locale:"repo.issues.label_color"`
}
// Validate validates the fields