You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 text was updated successfully, but these errors were encountered:
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 text was updated successfully, but these errors were encountered: