Base solution for your next web application
Open Closed

localization of validators in angular 7 reactive forms #6794


User avatar
0
BobIngham created

angular, dotnetcore, 6.8.0, .net 4.6.1 I have a validation message in an angular reactive form:

{{l("RequiredField", l('Surname'))}}

How do I use the localize pipe for both values? I can localize the second field but not the first:

{{l("RequiredField", 'Surname' | localize)}}

works. But

{{'RequiredField' | localize, 'Surname' | localize)}}

does not. Any ideas anyone?


29 Answer(s)
  • User Avatar
    0
    BobIngham created

    Okie dokie, I'll do that. In a couple of weeks... If it becomes a problem!

  • User Avatar
    0
    BobIngham created

    Aaron, can you point me to a reactive form in Zero?

  • User Avatar
    0
    aaron created
    Support Team

    Not that I'm aware of. Feature request: aspnetzero/aspnet-zero-core#1447

  • User Avatar
    0
    bdadmin created

    I am unable to use the l "language" method in a reactive form. The lable does not show up until you enter or leave the input. Using it like this... {{l('LicensePlate')}}

    As soon as I leave the input the label shows up.

    Has anyone solved this?