malli

Anton Shastun 2025-05-16T15:29:31.975489Z

What do you think, is it okay to use fn with side effects (lookup to db) inside malli scheme?

2025-05-19T23:09:44.148839Z

Lazy registries are designed for schemas that require side effects to initialize https://github.com/metosin/malli?tab=readme-ov-file#lazy-registries

๐Ÿ™ 1
Anton Shastun 2025-05-20T05:53:17.114059Z

Thank you, looks interesting

Samuel Ludwig 2025-05-16T15:50:15.494059Z

my first instinct would be to avoid that i think? I have been tempted to do something similar in the past for an enum (but the query would only happen once at startup), i think at that point though, a check like that probably belongs in business logic

๐Ÿ‘ 1
โž• 1
Samuel Ludwig 2025-05-16T15:51:38.635819Z

curious what you're using it for though

Anton Shastun 2025-05-16T18:13:53.195269Z

I was thinking to put email uniq verification on malli side

2025-05-18T13:14:30.863759Z

Past responses were: Put it in the business logic, not schema validation. Searching for โ€œunique emailโ€ I find this thread, perhaps itโ€™s helpful to you: https://clojurians.slack.com/archives/CLDK6MFMK/p1691330835332889

๐Ÿ™ 1
Anton Shastun 2025-05-18T15:45:48.352439Z

Thanks for sharing ๐Ÿ‘