Skip to content

Custom importsΒ #152

@apss-pohl

Description

@apss-pohl

Hi,

it would be nice to be able to configure custom imports.
When you want to use a function for the "class-validator" right now you can`t import it automated. In this example i need to import the "createValidationError" function.

model customer {
  /// @Validator.MaxLength(3, {message: createValidationError('form_string_max', ['max'])})
  number               BigInt    @db.UnsignedBigInt
}

Will be missing

import { createValidationError } from '@m/common/utils/validation-helper';

In the generated input files.

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