Skip to content

Commit

Permalink
update some for time.Time check
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Apr 10, 2021
1 parent 7837813 commit eddaae1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func (d *StructData) parseRulesFromTag(v *Validation) {

// collect rules from sub-struct and from arrays/slices elements
// TODO should use ft == timeType check time.Time
if !strings.Contains(ft.Name(), "Time") {
if ft != timeType {
if fValue.Type().Kind() == reflect.Ptr && fValue.IsNil() {
continue
}
Expand Down

0 comments on commit eddaae1

Please sign in to comment.