{"id":"67419b1ec64d9267","repo":"jackc/pgx","slug":"d-is-less-than-the-minimum-value-for-uint32","errorCode":null,"errorMessage":"%d is less than the minimum value for Uint32","messagePattern":"(.+?) is less than the minimum value for Uint32","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pgtype/uint32.go","lineNumber":61,"sourceCode":"\t}\n\n\tvar n int64\n\n\tswitch src := src.(type) {\n\tcase int64:\n\t\tn = src\n\tcase string:\n\t\tun, err := strconv.ParseUint(src, 10, 32)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tn = int64(un)\n\tdefault:\n\t\treturn fmt.Errorf(\"cannot scan %T\", src)\n\t}\n\n\tif n < 0 {\n\t\treturn fmt.Errorf(\"%d is less than the minimum value for Uint32\", n)\n\t}\n\tif n > math.MaxUint32 {\n\t\treturn fmt.Errorf(\"%d is greater than maximum value for Uint32\", n)\n\t}\n\n\t*dst = Uint32{Uint32: uint32(n), Valid: true}\n\n\treturn nil\n}\n\n// Value implements the [database/sql/driver.Valuer] interface.\nfunc (src Uint32) Value() (driver.Value, error) {\n\tif !src.Valid {\n\t\treturn nil, nil\n\t}\n\treturn int64(src.Uint32), nil\n}\n","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/jackc/pgx/blob/ec1a0befd22592cffffdeeb0a50311b506372f4c/pgtype/uint32.go#L43-L79","documentation":"Error \"%d is less than the minimum value for Uint32\" thrown in jackc/pgx.","triggerScenarios":"Thrown at pgtype/uint32.go:61 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"ec1a0befd22592cffffdeeb0a50311b506372f4c","analyzedAt":"2026-08-04T22:52:11.263Z","schemaVersion":2}