-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for base64url
strings
#3711
Comments
marvinruder
added a commit
to marvinruder/zod
that referenced
this issue
Aug 16, 2024
Fixes colinhacks#3711 Signed-off-by: Marvin A. Ruder <[email protected]>
marvinruder
added a commit
to marvinruder/zod
that referenced
this issue
Aug 30, 2024
Fixes colinhacks#3711 Signed-off-by: Marvin A. Ruder <[email protected]>
colinhacks
pushed a commit
to marvinruder/zod
that referenced
this issue
Dec 10, 2024
Fixes colinhacks#3711 Signed-off-by: Marvin A. Ruder <[email protected]>
colinhacks
added a commit
that referenced
this issue
Dec 10, 2024
* Add support for `base64url` strings Fixes #3711 Signed-off-by: Marvin A. Ruder <[email protected]> * Add comments Signed-off-by: Marvin A. Ruder <[email protected]> * Change test structure for `base64()`, `base64url()` Signed-off-by: Marvin A. Ruder <[email protected]> * Prettier * Avoid test.each --------- Signed-off-by: Marvin A. Ruder <[email protected]> Co-authored-by: Colin McDonnell <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
.base64()
function validates strings that contain binary information encoded in Base 64. A modification of Base 64 that can safely be used in URLs and filenames is given by thebase64url
standard specified in RFC 4648 § 5. As summarized here,I propose a method
.base64url()
that is similar to.base64()
, but instead matches against a regular expression that describesbase64url
-encoded values.The text was updated successfully, but these errors were encountered: