Correctness
Speed only matters if the answer is right. Before comparing how fast each library runs, this page checks whether they even agree on what counts as a valid value.
What the differences mean
Every difference below is a library being more permissive than RunTypes, never the other way around, and on each one RunTypes sits with at least one other mainstream library.
- Non-finite numbers. ajv and typia accept
NaNandInfinity; RunTypes rejects them (with zod and TypeBox), since none can be written to JSON. - Invalid dates. typia accepts a
Datebuilt from bad input likenew Date('invalid'); RunTypes checks the date is real, as do zod and TypeBox. - Plain objects. For an all-optional object, TypeBox accepts class instances like
DateandMap; RunTypes requires a plain object, matching zod. - Formats. Each library ships its own email, UUID and IP patterns, so a string one accepts another may reject. The shared data uses RunTypes' patterns.
Every library is given the exact same test data RunTypes is built against, and each cell counts the samples that library treats differently. A value of 0 means the library agrees with RunTypes everywhere on that case. A higher number means the library accepts values that RunTypes rejects. n-a means the library does not support that case at all. RunTypes is the reference column, so it is always 0. Hover any row to see the data tested and each library's validator.