the transformValidationOption allows to convert string to type values using enableImplicitConversion option
const transformedValidatedValues = await transformAndValidate(
schema,
requestPayload,
{ transformer: { enableImplicitConversion } } // E.g. string numbers will be converted to type number
);
however there is one issue. if your schema specifies one boolean property and the request payload pass any string other than 'true' or 'false' the transformer converts it into true.
the transformValidationOption allows to convert string to type values using enableImplicitConversion option
const transformedValidatedValues = await transformAndValidate( schema, requestPayload, { transformer: { enableImplicitConversion } } // E.g. string numbers will be converted to type number ); however there is one issue. if your schema specifies one boolean property and the request payload pass any string other than 'true' or 'false' the transformer converts it into true.