Skip to content

Commit

Permalink
fix: add max validation to minFreeSlots fields
Browse files Browse the repository at this point in the history
  • Loading branch information
reinaldooli committed Nov 25, 2024
1 parent 7ac3ef5 commit 9b51f67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/core/entities/allocation/allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type MatchAllocation struct {
MaxMatches int `validate:"required,min=1,max=30"`
// MinFreeSlots defines the minimum number of free slots that a room must
// have to become available for allocation.
MinFreeSlots int `validate:"required,min=1"`
MinFreeSlots int `validate:"required,min=1,max=30"`
}

func NewDefaultMatchAllocation() *MatchAllocation {
Expand Down

0 comments on commit 9b51f67

Please sign in to comment.