Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support usage of pipes in error messages #340

Open
ChrisKaun opened this issue Jun 10, 2020 · 1 comment
Open

Support usage of pipes in error messages #340

ChrisKaun opened this issue Jun 10, 2020 · 1 comment
Labels
enhancement New feature or request rxweb

Comments

@ChrisKaun
Copy link

Description

Issue is kinda related to #311 which contains a solution for translated validation error messages.
In my current use case I have a validation message for a maxDate validator that should contain the date of the validation.

Validator:
RxwebValidators.maxDate({ value: date, messageKey: 'before'})

Validation Message:
before: 'Muss vor dem {{0}} sein.'

This will add a error message to the FormControl like "Muss vor dem 2020-06-10 sein.".

Problem

I would like to use a angular pipe to transform the value into the expected behaviour. So lets assume that I want a fullTime-Date instead of the current displayed date format.
Changing the validation message to before: 'Muss vor dem {{ 0 | date: "fullTime" }} sein.' does not correctly transform the value, instead the whole phrase is simpy, returned as "Muss vor dem {{ 0 | date: "fullTime" }} sein.".

@ajayojha
Copy link
Member

@ChrisKaun Thanks For this request. The feature is already developed in another package, soon it will be released, Will let you know once I released the same.

@ajayojha ajayojha added this to the 2.0.0@rfv milestone Jun 29, 2020
@ajayojha ajayojha added the enhancement New feature or request label Jun 29, 2020
@ajayojha ajayojha added this to To do in who is doing what? via automation Jun 29, 2020
@ajayojha ajayojha added the rxweb label Jul 2, 2020
@ajayojha ajayojha removed this from the 2.0.0@rfv milestone Jul 13, 2020
@ajayojha ajayojha modified the milestone: 2.1.4@rfv Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rxweb
Projects
Development

No branches or pull requests

2 participants