Building your own validator
Fatima is completely agnostic on how you validate your secrets.
There's currently some built-in validators that you can use, but I will show you how to create your own.
Do not proceed on your own with these libraries
Unless you know what you're doing, I highly recommend using the built-in validators for the following libraries:
- Typia
How the validate function works
Inside your env.config.ts
there's an available validate
key that you can fill with a function of the following type:
Creating a custom validate function with zod
Info
Fatima alredy comes with a built-in zod validator, this is just an example.
Here's an example using zod
:
Validate
To validate, just run the validate command: