Skip to content

Commit

Permalink
fix: validation is being ignored when there no fields
Browse files Browse the repository at this point in the history
  • Loading branch information
gandarfh committed Oct 20, 2023
1 parent bde451a commit 6347b10
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions object.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ func objectMap(value interface{}, m Map, god_err GodError) error {
return fmt.Errorf("value is not a map")
}

if len(mapValue) == 0 {
return nil
}

for key, validation := range m {
fieldValue, _ := mapValue[key]
if err := validation(fieldValue); err.Error != nil {
Expand Down

0 comments on commit 6347b10

Please sign in to comment.