feat: add helper to register TypeBox string formats#265
Open
drewnetic wants to merge 3 commits intofastify:mainfrom
Open
feat: add helper to register TypeBox string formats#265drewnetic wants to merge 3 commits intofastify:mainfrom
drewnetic wants to merge 3 commits intofastify:mainfrom
Conversation
ilteoood
requested changes
Jan 10, 2026
9e77c88 to
6692ace
Compare
Author
|
Hi @ilteoood, just a gentle ping on this since it's been a few weeks! As mentioned below, I had already addressed all your feedback. I just pushed a tiny commit today to fix a small typo in the tests (uri to url) and clean up a stray semicolon. Everything should be good to go now! Let me know if you need anything else. |
ilteoood
reviewed
Mar 6, 2026
Co-authored-by: Matteo Pietro Dazzi <matteopietro.dazzi@gmail.com> Signed-off-by: Andrew Gouvêa Gonçalves de Souza <103960552+drewnetic@users.noreply.github.com>
45c8ded to
5231040
Compare
Author
|
Hi @ilteoood, just a quick update: I noticed the recent architectural changes for TS 5.9, so I went ahead and rebased this branch to resolve the merge conflicts. Everything is properly migrated to the new .ts setup and all tests are green again. Ready whenever you are! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What’s changed
This PR adds an official helper to register common string formats
(
date,date-time,email,uuid, etc.) when usingTypeBoxValidatorCompiler.Why
Fastify’s default AJV setup enables
ajv-formatsout of the box,but TypeBox does not register formats automatically.
This helper avoids copy/paste workarounds and keeps behavior explicit,
without introducing breaking changes.
Notes
Closes #84
Checklist
npm run test && npm run benchmark --if-presentand the Code of conduct