And just in case you were not aware, the built in JSON
node can also do schema validation
I agree with @TotallyInformation, this is more suited to a plugin/contrib node. There are a few existing ones:
- node-red-contrib-file-nunjucks (node) - Node-RED
- node-red-contrib-eta (node) - Node-RED
- node-red-contrib-handlebarsjs (node) - Node-RED
- node-red-contrib-pug (node) - Node-RED
- node-red-contrib-velocity (node) - Node-RED
- There are likely more in the flows lib: Library - Node-RED
And if you want to use zod you can always import it in a function node. I did that in this demo here: Model Context Protocol (MCP) over HTTP - #4 by Steve-Mcl and you can import pretty much any lib see this article for details