We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 969bb33 commit 5fb7c57Copy full SHA for 5fb7c57
internal/domain/checkout/validatecheckout.go
@@ -12,8 +12,8 @@ func (c *Checkout) Validate() error {
12
if c.CustomerEmail == "" {
13
return errors.New("CustomerEmail cannot be empty")
14
}
15
- if c.TotalPrice <= 0 {
16
- return errors.New("total price cannot be less than or equal to zero")
+ if c.TotalPrice < 0 {
+ return errors.New("total price cannot be less than zero")
17
18
if c.Timestamp.IsZero() {
19
return fmt.Errorf("timestamp cannot be zero")
0 commit comments