Skip to content

i18n on a per request basis? #1037

Answered by sinclairzx81
m1212e asked this question in Q&A
Oct 16, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

@m1212e Hiya

That helps thanks! I assume SetErrorFunction sets this in a global way so calls in different places would be affected too, right?

Yes, that's correct, it is global. Note that it is common in scenarios like this to set up a application specific validation pipeline for this, one where you don't call the TypeBox validation methods directly, rather you call some user defined function that would set the ErrorFunction based on other infrastructure you have. In this regard, you would view TypeBox validation as something that gets integrated into a wider infrastructure (web server, or other)

Hope this helps
S

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@m1212e
Comment options

@sinclairzx81
Comment options

Answer selected by m1212e
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