You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iot/labs/Teacher/Infrastructure/Web/LocalizedValidationAttribut...

15 lines
586 B

using Microsoft.AspNetCore.Mvc.DataAnnotations;
using Microsoft.Extensions.Localization;
using System.ComponentModel.DataAnnotations;
namespace Infrastructure.Web
{
public class LocalizedValidationAttributeAdapterProvider : ValidationAttributeAdapterProvider, IValidationAttributeAdapterProvider
{
public new IAttributeAdapter GetAttributeAdapter(ValidationAttribute attribute, IStringLocalizer stringLocalizer)
{
new RequiredAttributeAdapter(null, null);
return base.GetAttributeAdapter(attribute, stringLocalizer);
}
}
}