Skip to content

Commit

Permalink
refactor: validate return error
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentCosmic committed Jun 2, 2024
1 parent 76fb2a0 commit e952093
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rule_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (r Rules) Struct(validators ...Validator) Rules {
}

// Validate a struct and return Errors
func (r Rules) Validate(subject any) ErrorSlice {
func (r Rules) Validate(subject any) error {
errs := make(ErrorSlice, 0)
vmap := structToMap(subject)
for _, validator := range r.validators {
Expand Down

0 comments on commit e952093

Please sign in to comment.