toonvanstrijp / nestjs-i18n

The i18n module for nestjs.
https://nestjs-i18n.com
Other
646 stars 111 forks source link

for people who face: typeerror: cannot read properties of undefined (reading 'pipe') #623

Closed delai closed 3 weeks ago

delai commented 6 months ago

Describe the bug

add

    if (value.constructor.name === 'I18nContext') {
      return value
    }

at the beginning of the transform function in your ValidationPipe like this

image

Reproduction

@I18n() i18n: I18nContext

System Info

@I18n() i18n: I18nContext

Used Package Manager

npm

Validations