improve package gvalid

This commit is contained in:
John Guo 2021-11-22 22:47:00 +08:00
parent cea6e4c3d9
commit bbc43520fb

View File

@ -63,7 +63,7 @@ func (v *Validator) Run(ctx context.Context) Error {
isStructValidation := false
if v.rules == nil {
isStructValidation = true
} else if v.rules != nil && (utils.IsMap(v.rules) || utils.IsSlice(v.rules)) {
} else if utils.IsMap(v.rules) || utils.IsSlice(v.rules) {
isStructValidation = true
}
if isStructValidation {