Hyperlinkv0.8.0-beta.28

Schema

Schema.isUint32functioneffect/Schema.ts:7584
(annotations?: Annotations.Filter): SchemaAST.FilterGroup<number>

Validates that a number is a 32-bit unsigned integer (range: 0 to 4,294,967,295).

Details

JSON Schema:

This check corresponds to the format: "uint32" constraint in OpenAPI 3.1, or minimum/maximum constraints in other JSON Schema targets.

Arbitrary:

When generating test data with fast-check, this applies integer and range constraints to ensure generated numbers are 32-bit unsigned integers.

Integer checks
Source effect/Schema.ts:758412 lines
export function isUint32(annotations?: Annotations.Filter) {
  return new SchemaAST.FilterGroup(
    [
      isInt(),
      isBetween({ minimum: 0, maximum: 4294967295 })
    ],
    {
      expected: "a 32-bit unsigned integer",
      ...annotations
    }
  )
}