The underlying literal schema type to transform
The type of the transformed output
Creates a new transform modifier wrapping the given schema.
The transformation function to apply to validated values
The schema to apply transformations to
Define the input type of the schema (unchanged from parent)
The transformed output value type. The property points to a type only and not the real value.
Camelcase transformed output type
Creates a fresh instance of the underlying schema type and wraps it inside the transform modifier.
A cloned instance of this transform modifier
Mark the field under validation as optional. An optional field allows both null and undefined values.
Mark the field under validation to be null. The null value will be written to the output as well.
If optional and nullable are used together, then both undefined
and null values will be allowed.
Compiles to compiler node
Modifies a literal schema type to apply custom transformations to validated values. This modifier allows converting validated values to any new datatype after validation.
Example