Skip to content

Commit

Permalink
fix: 🐛 item の code が空文字なことを許容する
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoha000 committed Dec 18, 2023
1 parent 69b5126 commit 3f2e4a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (item Item) Validate() error {
return validation.ValidateStruct(&item,
validation.Field(&item.Name, validation.Required),
validation.Field(&item.Type, validation.By(checkItemType)),
validation.Field(&item.Code, validation.Required),
validation.Field(&item.Code, validation.NotNil),
validation.Field(&item.Description, validation.Required),
validation.Field(&item.ImgURL, is.URL),
)
Expand Down

0 comments on commit 3f2e4a8

Please sign in to comment.