|
|
@ -438,7 +438,7 @@ func (v *Validate) fieldWithNameAndValue(val interface{}, current interface{}, f |
|
|
|
|
|
|
|
|
|
|
|
param := "" |
|
|
|
param := "" |
|
|
|
if len(vals) > 1 { |
|
|
|
if len(vals) > 1 { |
|
|
|
param = strings.TrimSpace(vals[1]) |
|
|
|
param = vals[1] |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
cTag.keyVals[i] = []string{key, param} |
|
|
|
cTag.keyVals[i] = []string{key, param} |
|
|
@ -506,12 +506,12 @@ func (v *Validate) fieldWithNameAndSingleTag(val interface{}, current interface{ |
|
|
|
|
|
|
|
|
|
|
|
if err := valFunc(val, current, f, param); err { |
|
|
|
if err := valFunc(val, current, f, param); err { |
|
|
|
return nil, nil |
|
|
|
return nil, nil |
|
|
|
} else { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return &FieldError{ |
|
|
|
return &FieldError{ |
|
|
|
Field: name, |
|
|
|
Field: name, |
|
|
|
Tag: key, |
|
|
|
Tag: key, |
|
|
|
Value: f, |
|
|
|
Value: f, |
|
|
|
Param: param, |
|
|
|
Param: param, |
|
|
|
}, errors.New(key) |
|
|
|
}, errors.New(key) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|