toonvanstrijp / nestjs-i18n

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

Pass context, value and target from `ValidationError` to `I18nValidationError` and `I18nValidationException` #474

Closed calebpitan closed 1 year ago

calebpitan commented 1 year ago

I18nValidationError ignores, context, value and target keys of class validator ValidationError.

The context field is very important as it is used to transmit custom metadata on the validation constraint

Currently there's no way to access the context field

I think a notable place to take a look at is this file: https://github.com/toonvanstrijp/nestjs-i18n/blob/main/src/utils/util.ts#L28

lukadriel7 commented 1 year ago

I want to add that the constraints also aren't available, although the documentation states that at least constraints and value should be accessible.