Skip to content

Add a warn option #220

@TheLox95

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

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