fix
This commit is contained in:
@@ -2,6 +2,7 @@ package validator
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"apskel-pos-be/internal/constants"
|
||||
"apskel-pos-be/internal/contract"
|
||||
@@ -71,8 +72,7 @@ func (v *ProductOutletPriceValidatorImpl) ValidateBulkCreateRequest(req *contrac
|
||||
return errors.New("outlet_id is required for each price entry"), constants.MissingFieldErrorCode
|
||||
}
|
||||
if p.Price < 0 {
|
||||
_ = i
|
||||
return errors.New("price must be non-negative for each price entry"), constants.MalformedFieldErrorCode
|
||||
return fmt.Errorf("price at index %d must be non-negative", i), constants.MalformedFieldErrorCode
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user