Make RequiredAttributeAdapter public
Fixes https://github.com/aspnet/Mvc/issues/8744
This commit is contained in:
parent
f52882b6aa
commit
8a0fa732b0
|
|
@ -8,13 +8,22 @@ using Microsoft.Extensions.Localization;
|
||||||
|
|
||||||
namespace Microsoft.AspNetCore.Mvc.DataAnnotations
|
namespace Microsoft.AspNetCore.Mvc.DataAnnotations
|
||||||
{
|
{
|
||||||
internal class RequiredAttributeAdapter : AttributeAdapterBase<RequiredAttribute>
|
/// <summary>
|
||||||
|
/// <see cref="AttributeAdapterBase{TAttribute}"/> for <see cref="RequiredAttribute"/>.
|
||||||
|
/// </summary>
|
||||||
|
public sealed class RequiredAttributeAdapter : AttributeAdapterBase<RequiredAttribute>
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of <see cref="RequiredAttributeAdapter"/>.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="attribute">The <see cref="RequiredAttribute"/>.</param>
|
||||||
|
/// <param name="stringLocalizer">The <see cref="IStringLocalizer"/>.</param>
|
||||||
public RequiredAttributeAdapter(RequiredAttribute attribute, IStringLocalizer stringLocalizer)
|
public RequiredAttributeAdapter(RequiredAttribute attribute, IStringLocalizer stringLocalizer)
|
||||||
: base(attribute, stringLocalizer)
|
: base(attribute, stringLocalizer)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
public override void AddValidation(ClientModelValidationContext context)
|
public override void AddValidation(ClientModelValidationContext context)
|
||||||
{
|
{
|
||||||
if (context == null)
|
if (context == null)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue