Skip to content

Add a warn option #220

Description

@TheLox95

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.",
  }),
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions