Fork me on GitHub
#malli
<
2022-10-03
>
robert-stuttaford12:10:17

is there a Correct™ way to test if a value is a valid malli spec? i'd like to avoid try catch if that's possible

Noah Bogart13:10:18

You mean “can the given form be used as a Malli schema”, not “does the given form conform to an existing malli schema”, right?

respatialized14:10:58

AFAIK there isn't yet a self-describing meta-schema for malli schemas; the only way I've done this is indeed with try/catch on m/schema.

☝️ 1
ikitommi07:10:43

Schemas can define their schemas as schemas. The IntoSchema has the needed hooks, someone just needs to write the Schemas for properties & Children.