Skip to content

Commit

Permalink
fix: make ValidateLength error more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdecaf committed Jan 11, 2024
1 parent a8085be commit 29f840d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/rtp/restrictions.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func ValidateEnumeration(value string, enumeration ...string) error {
func ValidateLength(value string, length int) error {
var strLength = utf8.RuneCountInString(value)
if strLength != length {
return fmt.Errorf("%s fails validation with length %v != required length %v", value, strLength, length)
return fmt.Errorf("%s fails validation with length %v, length %v required", value, strLength, length)
}
return nil
}
Expand Down

0 comments on commit 29f840d

Please sign in to comment.