Skip to content

Code Review for TypeBox Adapter for client-side form validation library #711

Answered by sinclairzx81
lifeiscontent asked this question in Q&A
Discussion options

You must be logged in to vote

@lifeiscontent Hiya,

How do we add custom validation to typebox? For example, it's common to ask for the password twice in a signup form and validated whether both passwords match. How can we implement this using typebox?

A matching password check would need to be handled post validation

Does typebox support async validation? If yes, can we also support it in the integration?

TypeBox does not support async validation, you will need to await values before checking them.

How does the coercion work and how does it handle empty string?

Type coercion is supported via Value.Convert


I'm not sure what the requirements of conform are, but if it needs validation libraries to perform addition…

Replies: 1 comment 2 replies

Comment options

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

@sinclairzx81
Comment options

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