zod
zod copied to clipboard
Add string jwt
Add a .jwt() validator in string type.
It expects for a string with 3 parts splited by . with the first part being a base64 encoded string that represents a objetc wit a property type with value JWT.
It validates just format NOT signature.
Resolves #2946
Deploy Preview for guileless-rolypoly-866f8a ready!
| Name | Link |
|---|---|
| Latest commit | 00ba486136e2230fdc4139d9c3f6df2c1b48b5b4 |
| Latest deploy log | https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/662842d236cd16000958338b |
| Deploy Preview | https://deploy-preview-2666--guileless-rolypoly-866f8a.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Just a reminder that you left some console.logs in the code
Ooopss... thanks man, already removed.
Why wasn't this PR merged yet? It will be very useful for my use case! Does it need some improvements?
Hey guys, anything else I should do to it be accept?
Hello @colinhacks
I believe this PR are good to go. Let me know if need anything else.
Thanks, this is excellent stuff! Apologies for the long turnaround time. I'm hesitant to merge features like this into Zod 3 for bundle size reasons. Zod 4 will have better tree shaking characteristics so I'm merging this into the v4 branch. Some version of this will land in Zod 4, but (as a heads up) it may be a while, and this feature/API will likely undergo some changes in the interim.