Closed morgrowe closed 3 years ago
Ahh, I'm a numpty. I just realised I can just store:
Your query must be less than {{MaxLength}} characters
In database and it works (double {{
and }}
).
Sorry!
Hi @morgrowe,
Thank you for your kind message, weekends are always awesome, hope it is so for you too :)
I was just typing to answer your issue, but it seems you already found a perfect solution, that is great 👍🏼
Have a nice day, Ziya
Hi Ziya
Hope you had a nice weekend.
I stumbled onto something and couldn't figure out a way around it. I'm using FluentValidation for my validating my ViewModels. It supports the ability to use placeholders. This works as expected using the following code (not using XLocalizer):
In my View, I'd see an error message like so:
Your query must be less than 4000 characters
should the user trigger it.However, if I store the string in my database like so:
Using XLocalizer v1.0.0, I can retrieve the string like this:
But unfortunately, the following exception is thrown:
I have appended the whole stack trace to the end of this post. My theory is XLocalizer is expecting a number to be in-between the
{
and}
. Is there a way of accommodating the placeholders FluentValidation supports and the ones XLocalizer provides?Thanks, as always! Morgan