diff --git a/src/decorator/string/IsBase64.ts b/src/decorator/string/IsBase64.ts index c59a97009b..e7002e0e9a 100644 --- a/src/decorator/string/IsBase64.ts +++ b/src/decorator/string/IsBase64.ts @@ -26,7 +26,7 @@ export function IsBase64( name: IS_BASE64, constraints: [options], validator: { - validate: (value, args): boolean => isBase64(value, options), + validate: (value, args): boolean => isBase64(value, args?.constraints[0]), defaultMessage: buildMessage(eachPrefix => eachPrefix + '$property must be base64 encoded', validationOptions), }, },