-
Notifications
You must be signed in to change notification settings - Fork 830
Closed
Labels
status: needs triageIssues which needs to be reproduced to be verified report.Issues which needs to be reproduced to be verified report.type: fixIssues describing a broken feature.Issues describing a broken feature.
Description
Description
By passing { urlSafe: true }
to @IsBase64
, it is supposed to validate base64url correctly, but it doesn’t seem to work properly.
Minimal code-snippet showcasing the problem
export class Base64Test {
@IsBase64({ urlSafe: true })
base64: string;
static from(base64: string): Base64Test {
return plainToInstance(Base64Test, { base64 });
}
}
const obj = Base64Test.from("dGVzdA");
const errors = await validate(obj);
if (errors.length > 0) {
console.log("Failed to validate")
} else {
console.log("Successfully validated")
}
Expected behavior
It should log Successfully validated
Actual behavior
It logs Failed to validate
acrazing
Metadata
Metadata
Assignees
Labels
status: needs triageIssues which needs to be reproduced to be verified report.Issues which needs to be reproduced to be verified report.type: fixIssues describing a broken feature.Issues describing a broken feature.