Function type for transforming validated values after successful validation. Transformers receive the validated value and return a modified version, allowing for data manipulation like formatting, normalization, or type conversion.
The schema type being transformed
The type of the transformed output
const uppercaseTransformer: Transformer<StringSchema, string> = (value) => { return value.toUpperCase()} Copy
const uppercaseTransformer: Transformer<StringSchema, string> = (value) => { return value.toUpperCase()}
Function type for transforming validated values after successful validation. Transformers receive the validated value and return a modified version, allowing for data manipulation like formatting, normalization, or type conversion.