Closed thelastkiller99 closed 4 years ago
I @thelastkiller99, could you please provide a reproducible example? (I suggest for example to fork this https://stackblitz.com/github/xtreamsrl/ngx-validation-errors on stackblitz)
That same example that you propose is the one that has the error since it does not show the content of the JSON (for example NEW_HERO.NAME.ERRORS.MINLENGTH)
Can you show me the translation file? according to the key it should be like:
{
"NEW_HERO": {
"NAME" : {
"ERRORS": {
"MIN_LENGTH": "error message"
}
}
}
}
Moreover be aware that the custom error component do not use the translation pipe (just for showing errors keys purpose)
<div *ngIf="messages && messages.length>0">
Custom component {{messages}}
</div>
while the standard input does
<span class="help-block" *ngFor="let message of messages;">{{ message | translate:params }}</span>
Hello, I am trying to implement a custom validation design but when I want to get the JSON text it finds it but does not return it translated in {{messages}}. I tried to use {{messages [0]}} and I could get the message but when I use variables for MINLENGTH for example it doesn't recognize them.