|
|
@ -113,8 +113,7 @@ func (v *validate) ReportError(field interface{}, fieldName, structFieldName, ta |
|
|
|
v.str2 = v.str1 |
|
|
|
v.str2 = v.str1 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
switch kind { |
|
|
|
if kind == reflect.Invalid { |
|
|
|
case reflect.Invalid: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
v.errs = append(v.errs, |
|
|
|
v.errs = append(v.errs, |
|
|
|
&fieldError{ |
|
|
|
&fieldError{ |
|
|
@ -128,24 +127,23 @@ func (v *validate) ReportError(field interface{}, fieldName, structFieldName, ta |
|
|
|
kind: kind, |
|
|
|
kind: kind, |
|
|
|
}, |
|
|
|
}, |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
return |
|
|
|
default: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
v.errs = append(v.errs, |
|
|
|
|
|
|
|
&fieldError{ |
|
|
|
|
|
|
|
tag: tag, |
|
|
|
|
|
|
|
actualTag: tag, |
|
|
|
|
|
|
|
ns: v.str1, |
|
|
|
|
|
|
|
structNs: v.str2, |
|
|
|
|
|
|
|
field: fieldName, |
|
|
|
|
|
|
|
structField: structFieldName, |
|
|
|
|
|
|
|
value: fv.Interface(), |
|
|
|
|
|
|
|
param: param, |
|
|
|
|
|
|
|
kind: kind, |
|
|
|
|
|
|
|
typ: fv.Type(), |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
v.errs = append(v.errs, |
|
|
|
|
|
|
|
&fieldError{ |
|
|
|
|
|
|
|
tag: tag, |
|
|
|
|
|
|
|
actualTag: tag, |
|
|
|
|
|
|
|
ns: v.str1, |
|
|
|
|
|
|
|
structNs: v.str2, |
|
|
|
|
|
|
|
field: fieldName, |
|
|
|
|
|
|
|
structField: structFieldName, |
|
|
|
|
|
|
|
value: fv.Interface(), |
|
|
|
|
|
|
|
param: param, |
|
|
|
|
|
|
|
kind: kind, |
|
|
|
|
|
|
|
typ: fv.Type(), |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// ReportValidationErrors reports ValidationErrors obtained from running validations within the Struct Level validation.
|
|
|
|
// ReportValidationErrors reports ValidationErrors obtained from running validations within the Struct Level validation.
|
|
|
|