Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a warn option #220

Open
TheLox95 opened this issue Apr 11, 2024 · 0 comments
Open

Add a warn option #220

TheLox95 opened this issue Apr 11, 2024 · 0 comments

Comments

@TheLox95
Copy link

Hi all
I think it would be helpful to have the option to define a custom warning message that would be show on console when a var is not defined

import { cleanEnv, str } from "envalid";

const env = cleanEnv(process.env, {
  EMAIL_SMTP: str({
    warning: "EMAIL_SMTP is not set. App will run but it will not send any email.",
  }),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant