I have 2 properties Email and Confirm Email. How to provide string format arg for both localized property Name For Example:-
public class Account
{
public string Email {get;set;}
public string ConfirmEmail {get;set;}
}
Public AccountValidator : AbstractValidator<Account>
{
public AccountValidator()
{
RuleFor(a=> a.Email)
.Equal(a=>a.ConfirmEmail)
.WithLocalizedMessage(() => MyResource.compareFields);
}
}
My resource File has message like this:-
'{PropertyName}' and '{ ??? }' fields do not match.
What should I use in ??? so that it says : -
'Email' and 'ConfirmEmail' fields do not match.