This commit is contained in:
zhangdeman committed 2024-11-01 18:02:12 +08:00
1 parent 974063eb26
commit 4c70ca6f84
1 file changed
+1 -2
+1 -2
View File
@@ -8,7 +8,6 @@
package validator
import (
"errors"
"fmt"
"git.zhangdeman.cn/gateway/validator/define"
"git.zhangdeman.cn/zhangdeman/util"
@@ -121,7 +120,7 @@ func handleString(inputVal any, rule *define.FieldRule) (string, error) {
// 传入的不是string类型
if rule.DisableAutoConvert {
// 禁用类型转换
return "", errors.Errorf("%v : filed type is %v, data value auto convert is disabled, input value type is %v", rule.Path, rule.Type, reflect.TypeOf(inputVal).Kind().String())
return "", fmt.Errorf("%v : filed type is %v, data value auto convert is disabled, input value type is %v", rule.Path, rule.Type, reflect.TypeOf(inputVal).Kind().String())
}
if err = util.ConvertAssign(&formatData, inputVal); nil != err {
return "", err
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.