Shared
TypeCoercer
Coerce raw strings and payload tables into typed Roblox values. Used automatically by the Router for typed route params. Available standalone for validating request payloads before processing.
Import
local TypeCoercer = RoExpress.TypeCoercer
convert
Coerce
Convert a single value to a named type, or validate an entire payload table against a field-by-field schema returning success, a result, and any per-field errors.
TypeCoercer.Coerce · TypeCoercer.CoerceTable
→
reference
Supported Types
Full reference of every type name recognised by TypeCoercer — what it coerces from and the Luau result type on success.
number · boolean · Vector2 · Vector3 · CFrame · Color3 · Enum · Instance · UDim · UDim2 · Rect
→
See also
TypeCoercer Guide | usage patterns with routes and DataStore · Router | typed route params and RouteBuilder · Types | Luau type definitions · Codec | binary serialization for Stream channels