We can implement this in two ways:
- User provides an endpoint, and DatoCMS calls such endpoint passing the payload to validate
- User provides some JS validation function, and DatoCMS runs it inside a sandbox environment https://www.npmjs.com/package/vm2