Skip to content

String formats do not work #853

Answered by sinclairzx81
adrtivv asked this question in Q&A
Apr 27, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Hiya,

Then why does typebox provide the option of passing in the format field in String types if it is useless by its own? Either it should be removed or it should be documented how to explicitly configure and enable it.

Keep in mind that TypeBox is primarily a Json Schema builder whose types are designed to be checked by any Json Schema compliant validator. Because of this, the format options are provided to be representative of the Json Schema specification formats (listed here), but TypeBox makes no assumptions as to if you're using Ajv, Hyperjump, TypeCompiler or other library. It also makes no assumptions with respect to the capabilities of each validator.

With respect to formats s…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@adrtivv
Comment options

@sinclairzx81
Comment options

Answer selected by adrtivv
@adrtivv
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants