metosin/malli

Feature: Using Java classes as schemas

Open

#1,007 opened on Feb 2, 2024

View on GitHub
 (5 comments) (1 reaction) (0 assignees)Clojure (1,724 stars) (237 forks)batch import
enhancementhelp wanted

Description

Occasionally, it is necessary to drop down to Java interop. When that happens, I don't want to lose the ease and simplicity of Malli's validation, and I don't want to have to write my own custom :fn schema each time merely to call (instance? SomeClass value).

It would be helpful to have support for recognizing Java classes, effectively wrapping instance? for general use. I looked at the malli.core code and I'm not entirely sure how to accomplish this or I'd offer to do it.

Thanks so much

Contributor guide