Open kageja opened 4 years ago
May be it will help.
"System.InvalidOperationException" in Microsoft.Extensions.Caching.Memory.dll "System.ComponentModel.DataAnnotations.ValidationException" in Uon2.dll "System.ComponentModel.DataAnnotations.ValidationException" in System.Private.CoreLib.dll
This messages I get in UoN project.
My attribute:
[RequiredIf(nameof(WorkType) + " == " + nameof(TargetWorkType) + "." + nameof(TargetWorkType.Done), ErrorMessage = "Укажите источник.")]
This work perfectly before I migrate to asp.net core 3.1.
@kageja try to put ".AddExpressiveAnnotations();" at beginning of ConfigureServices. Like this:
public void ConfigureServices(IServiceCollection services){
services.AddExpressiveAnnotations();
...other code... }
It helps me.
It doesn't work for me either - even if I try putting the services.AddExpressiveAnnotations(); in a number of different locations. It is very frustrating. I'm using .net core 2.2.
Hi, I use SharedResource in asp.net core 3.1 and If I use RequiredIf with ErrorMessage, I can't get my text in different Language
Thanks in advance