@otakusan76/nestjs-environment-variables-provider - v1.0.6
    Preparing search index...

    Function EmailProperty

    • This decorator can be used to validate and transform a field in a email or an array of emails.

      Parameters

      • Optionaloptions: IsEmailOptions

        Options to be passed to the decorator.

      • OptionalvalidationOptions: ValidationOptions

        Validation options (e.g. each for collections).

      Returns PropertyDecorator

      A property decorator that validates and transforms the field to an email or an array of emails.

      Your can load environment variables in the form of an email.

      import { EmailProperty } from '@otakusan76/nestjs-environment-variables-provider/decorators';

      export class EnvironmentVariables {
      @EmailProperty()
      public readonly VALUE!: boolean;
      }

      You also can load environment variables in the form of an array of emails.

      import { EmailProperty } from '@otakusan76/nestjs-environment-variables-provider/decorators';

      export class EnvironmentVariables {
      @EmailProperty({}, { each: true })
      public readonly VALUES!: boolean[];
      }