RegularExpressionAttributeAdapter Class¶
- Namespace
Microsoft.AspNetCore.Mvc.DataAnnotations.Internal
- Assemblies
- Microsoft.AspNetCore.Mvc.DataAnnotations
Inheritance Hierarchy¶
System.Object
Microsoft.AspNetCore.Mvc.DataAnnotations.Internal.ValidationAttributeAdapter{System.ComponentModel.DataAnnotations.RegularExpressionAttribute}
Microsoft.AspNetCore.Mvc.DataAnnotations.Internal.AttributeAdapterBase{System.ComponentModel.DataAnnotations.RegularExpressionAttribute}
Microsoft.AspNetCore.Mvc.DataAnnotations.Internal.RegularExpressionAttributeAdapter
Syntax¶
public class RegularExpressionAttributeAdapter : AttributeAdapterBase<RegularExpressionAttribute>, IAttributeAdapter, IClientModelValidator
-
class
Microsoft.AspNetCore.Mvc.DataAnnotations.Internal.
RegularExpressionAttributeAdapter
Constructors¶
-
RegularExpressionAttributeAdapter
(System.ComponentModel.DataAnnotations.RegularExpressionAttribute, Microsoft.Extensions.Localization.IStringLocalizer)¶ public RegularExpressionAttributeAdapter(RegularExpressionAttribute attribute, IStringLocalizer stringLocalizer)
-
Methods¶
-
AddValidation
(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ClientModelValidationContext)¶ public override void AddValidation(ClientModelValidationContext context)
-
GetErrorMessage
(Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ModelValidationContextBase)¶ Return type: System.String public override string GetErrorMessage(ModelValidationContextBase validationContext)
-