rajupaladiya wrote:Finally I am able to solve this, just add line below to your ConfigureServices where you inherit INopStartup in your custom plugin, it will solve the issue:
//register validator
services.AddTransient<IValidator<CustomRegisterModel>, RegisterValidator>();
overall code will be as below:
/// <summary>
/// Add and configure any of the middleware
/// </summary>
/// <param name="services">Collection of service descriptors</param>
/// <param name="configuration">Configuration root of the application</param>
//public void ConfigureServices(IServiceCollection services, IConfigurationRoot configuration)
public void ConfigureServices(IServiceCollection services, IConfiguration configuration)
{
//register validator
services.AddTransient<IValidator<CustomRegisterModel>, RegisterValidator>();
}
Hey, This is working perfectly.
Thank you for sharing.
Hi,
is there a solution for this in version 4.40?
This solution does not seem to work and if I have read that correctly, NopCommercere will not create a solution either.
Best regards