diff --git a/run.go b/run.go index 8a13d96..a94ea48 100644 --- a/run.go +++ b/run.go @@ -241,15 +241,15 @@ func handleData(inputVal any, rule *define.FieldRule) (any, error) { switch rule.Type { case consts.DataTypeAny: // 任意类型 return inputVal, nil - case consts.DataTypeFloat: // float数据 + case consts.DataTypeFloat, consts.DataTypeFloatPtr: // float数据 return handleFloat(inputVal, rule) - case consts.DataTypeInt: // int类型 + case consts.DataTypeInt, consts.DataTypeIntPtr: // int类型 return handleInt(inputVal, rule) - case consts.DataTypeUint: + case consts.DataTypeUint, consts.DataTypeUintPtr: return handleUint(inputVal, rule) - case consts.DataTypeString: // 字符串处理 + case consts.DataTypeString, consts.DataTypeStringPtr: // 字符串处理 return handleString(inputVal, rule) - case consts.DataTypeBool: + case consts.DataTypeBool, consts.DataTypeBoolPtr: return handleBool(inputVal, rule) case consts.DataTypeMapStrFloat, consts.DataTypeMapStrFloatWithMarshal, consts.DataTypeMapStrBool, consts.DataTypeMapStrBoolWithMarshal,