|
|
@ -345,7 +345,7 @@ func (u *Unmarshaler) processNamedFieldWithValue(field reflect.StructField, valu
|
|
|
|
options := opts.options()
|
|
|
|
options := opts.options()
|
|
|
|
if len(options) > 0 {
|
|
|
|
if len(options) > 0 {
|
|
|
|
if !stringx.Contains(options, mapValue.(string)) {
|
|
|
|
if !stringx.Contains(options, mapValue.(string)) {
|
|
|
|
return fmt.Errorf(`error: value "%s" for field "%s" is not defined in opts "%v"`,
|
|
|
|
return fmt.Errorf(`error: value "%s" for field "%s" is not defined in options "%v"`,
|
|
|
|
mapValue, key, options)
|
|
|
|
mapValue, key, options)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|