Code Review for TypeBox Adapter for client-side form validation library #711
-
Hi there, I've started to build out an adapter for TypeBox and a form validation library called conform, would love some feedback on the PR to see if there are some optimizations that could be done. Have a look here: edmundhung/conform#368 and thank you for your time! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@lifeiscontent Hi, The code looks fine, good work :) The only thing that stood out was maybe the use of I've just quickly updated this code to infer as StaticDecode if you want to give this a test, but you will want to be mindful of pushing out TS inference (as StaticDecode can be a very expensive type to compute (as Transforms are mapped through the Type System)). The following is entirely optional, but if you want to use it, just try and gauge editor performance for large types first. Nice work! |
Beta Was this translation helpful? Give feedback.
@lifeiscontent Hiya,
A matching password check would need to be handled post validation
TypeBox does not support async validation, you will need to await values before checking them.
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…