envalid icon indicating copy to clipboard operation
envalid copied to clipboard

Add a warn option

Open TheLox95 opened this issue 1 year ago • 0 comments

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

TheLox95 avatar Apr 11 '24 08:04 TheLox95