How do I extend ajv with custom packages, eg https://github.com/ajv-validator/ajv-keywords?
I don't see how I can grab the ajv instance to enable something like this:
require('ajv-keywords')(ajv);
ajv.validate({ instanceof: 'RegExp' }, /.*/); // true
ajv.validate({ instanceof: 'RegExp' }, '.*'); // false
It doesn't look like I can trigger this via the ajvConfigBody options for example.
Thanks!
How do I extend
ajvwith custom packages, eghttps://github.com/ajv-validator/ajv-keywords?I don't see how I can grab the
ajvinstance to enable something like this:It doesn't look like I can trigger this via the
ajvConfigBodyoptions for example.Thanks!