{"record":{"id":"fac3656cb72cada0","repo":"go-playground/validator","slug":"tag-s-kh-ng-th-d-ng-tr-n-ki-u-struct","errorCode":null,"errorMessage":"tag '%s' không thể dùng trên kiểu struct","messagePattern":"tag '(.+?)' không thể dùng trên kiểu struct","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"translations/vi/vi.go","lineNumber":416,"sourceCode":"\n\t\t\t\tcase reflect.Slice, reflect.Map, reflect.Array:\n\t\t\t\t\tvar c string\n\n\t\t\t\t\terr = fn()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tgoto END\n\t\t\t\t\t}\n\n\t\t\t\t\tc, err = ut.C(\"lt-items-item\", f64, digits, ut.FmtNumber(f64, digits))\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tgoto END\n\t\t\t\t\t}\n\n\t\t\t\t\tt, err = ut.T(\"lt-items\", fe.Field(), c)\n\n\t\t\t\tcase reflect.Struct:\n\t\t\t\t\tif fe.Type() != reflect.TypeOf(time.Time{}) {\n\t\t\t\t\t\terr = fmt.Errorf(\"tag '%s' không thể dùng trên kiểu struct\", fe.Tag())\n\t\t\t\t\t\tgoto END\n\t\t\t\t\t}\n\n\t\t\t\t\tt, err = ut.T(\"lt-datetime\", fe.Field())\n\n\t\t\t\tdefault:\n\t\t\t\t\terr = fn()\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\tgoto END\n\t\t\t\t\t}\n\n\t\t\t\t\tt, err = ut.T(\"lt-number\", fe.Field(), ut.FmtNumber(f64, digits))\n\t\t\t\t}\n\n\t\t\tEND:\n\t\t\t\tif err != nil {\n\t\t\t\t\tfmt.Printf(\"cảnh báo: lỗi chuyển ngữ FieldError: %s\", err)\n\t\t\t\t\treturn fe.(error).Error()","sourceCodeStart":398,"sourceCodeEnd":434,"githubUrl":"https://github.com/go-playground/validator/blob/facf128d2eecf42bd4ff447adc961aa21bb64aed/translations/vi/vi.go#L398-L434","documentation":"Raised inside the Vietnamese 'lt' translation registration when the field being translated is a struct. lt only applies to numeric kinds, strings, slices/maps/arrays (length) and time.Time; a generic struct has no 'less than' meaning, so the translator stops with this error. It fires when a struct field other than time.Time carries the lt tag.","triggerScenarios":"Thrown at translations/vi/vi.go:416 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the lt tag from the struct field","Apply lt to comparable inner fields instead","Use RegisterStructValidation for custom struct-wide rules","Verify datetime fields are exactly of type time.Time"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"facf128d2eecf42bd4ff447adc961aa21bb64aed","analyzedAt":"2026-09-02T10:19:04.986Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T16:17:10.729Z"}