Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
374 lines (340 sloc) 24.3 KB
<Type Name="DataTypeAttribute" FullName="System.ComponentModel.DataAnnotations.DataTypeAttribute">
<TypeSignature Language="C#" Value="public class DataTypeAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit DataTypeAttribute extends System.ComponentModel.DataAnnotations.ValidationAttribute" />
<TypeSignature Language="DocId" Value="T:System.ComponentModel.DataAnnotations.DataTypeAttribute" />
<TypeSignature Language="VB.NET" Value="Public Class DataTypeAttribute&#xA;Inherits ValidationAttribute" />
<TypeSignature Language="C++ CLI" Value="public ref class DataTypeAttribute : System::ComponentModel::DataAnnotations::ValidationAttribute" />
<TypeSignature Language="F#" Value="type DataTypeAttribute = class&#xA; inherit ValidationAttribute" />
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ComponentModel.DataAnnotations.ValidationAttribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;dotnet-uwp-10.0">
<AttributeName>System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Method | System.AttributeTargets.Parameter | System.AttributeTargets.Property, AllowMultiple=false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-3.5">
<AttributeName>System.AttributeUsage(System.AttributeTargets.Property | System.AttributeTargets.Field, AllowMultiple=false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;netcore-1.0;netcore-1.1;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;xamarinmac-3.0;netcore-3.0">
<AttributeName>System.AttributeUsage(System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Field | System.AttributeTargets.Parameter, AllowMultiple=false)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Specifies the name of an additional type to associate with a data field.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute> attribute enables you to mark fields by using a type that is more specific than the database intrinsic type. The type name is selected from the <xref:System.ComponentModel.DataAnnotations.DataType> enumeration type. For example, a string data field that contains email addresses can be specified as the <xref:System.ComponentModel.DataAnnotations.DataType.EmailAddress> type. This information is then accessed by the field templates to modify how the data field is processed.
You use the <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute> attribute for the following reasons:
- To provide additional type information for a data field. You do this by applying the <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute> attribute to a data field in the data model and by specifying the additional type name from the <xref:System.ComponentModel.DataAnnotations.DataType> enumeration. The field template that processes the data field can access this additional metadata type information to determine how to process the field. For example, the text field template can generate hyperlinks for email addresses whose intrinsic type is `String`.
- To associate a custom field template with a data field. The specified custom field template will then be used to process the data field. This is an alternative to using the <xref:System.ComponentModel.DataAnnotations.UIHintAttribute> attribute.
When you apply the <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute> attribute to a data field you must do the following:
- Follow the attribute usage rules.
- Implement the metadata class that contains the data fields to which you want to apply the attribute.
- Issue validation errors as appropriate.
For more information, see [ASP.NET Dynamic Data Guidelines](https://msdn.microsoft.com/library/c563bbf3-feb9-484e-81d1-a585f1b0e192).
## Examples
The following example uses the <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute> attribute to customize the display of the EmailAddress data field. The email addresses are shown as hyperlinks instead of as simple text, which is what Dynamic Data would infer from the intrinsic data type. The example code is in three parts, and it performs the following steps:
- It implements a metadata partial class and the associated metadata class.
- In the associated metadata class, it applies the <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute> attribute to the EmailAddress data field by specifying the <xref:System.ComponentModel.DataAnnotations.DataType.EmailAddress> enumerated value. This indicates to the Text.ascx field template that it should customize the display of email addresses.
- It modifies the Text.ascx field template to customize the display of the EmailAddress data fields.
[!code-csharp[System.ComponentModel.DataAnnotations.DataTypeAttribute#1](~/samples/snippets/csharp/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/CS/Customer.cs#1)]
[!code-vb[System.ComponentModel.DataAnnotations.DataTypeAttribute#1](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/VB/Customer.vb#1)]
[!code-aspx-csharp[System.ComponentModel.DataAnnotations.DataTypeAttribute#2](~/samples/snippets/csharp/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/CS/Text.ascx#2)]
[!code-aspx-vb[System.ComponentModel.DataAnnotations.DataTypeAttribute#2](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/VB/Text.ascx#2)]
[!code-csharp[System.ComponentModel.DataAnnotations.DataTypeAttribute#3](~/samples/snippets/csharp/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/CS/Text.ascx.cs#3)]
[!code-vb[System.ComponentModel.DataAnnotations.DataTypeAttribute#3](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/VB/Text.ascx.vb#3)]
To compile and run the example code, you need the following:
- Any edition of Visual Studio 2010 or later.
- The AdventureWorksLT sample database. For information about how to download and install the SQL Server sample database, see [Microsoft SQL Server Product Samples: Database](https://github.com/Microsoft/sql-server-samples/releases) on GitHub. Make sure that you install the correct version of the sample database for the version of SQL Server that you are running.
- A data-driven Web site. This enables you to create a data context for the database and to create the class that contains the data field to customize. For more information, see `Walkthrough: Creating a New Dynamic Data Web Site using Scaffolding`.
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.DataAnnotations.ValidationAttribute" />
<altmember cref="T:System.ComponentModel.DataAnnotations.UIHintAttribute" />
<altmember cref="T:System.ComponentModel.DataAnnotations.DataType" />
<altmember cref="T:System.AttributeUsageAttribute" />
<altmember cref="T:System.AttributeTargets" />
<related type="Article" href="https://msdn.microsoft.com/library/7eb4d286-1630-4d41-b99d-869b58d9bd49">How to: Customize Data Field Appearance and Behavior For Non-Intrinsic Data Types in the Data Model</related>
<related type="Article" href="~/docs/standard/attributes/index.md">Extending Metadata Using Attributes</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DataAnnotations.DataTypeAttribute" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DataTypeAttribute (System.ComponentModel.DataAnnotations.DataType dataType);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.ComponentModel.DataAnnotations.DataType dataType) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.DataAnnotations.DataTypeAttribute.#ctor(System.ComponentModel.DataAnnotations.DataType)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; DataTypeAttribute(System::ComponentModel::DataAnnotations::DataType dataType);" />
<MemberSignature Language="F#" Value="new System.ComponentModel.DataAnnotations.DataTypeAttribute : System.ComponentModel.DataAnnotations.DataType -&gt; System.ComponentModel.DataAnnotations.DataTypeAttribute" Usage="new System.ComponentModel.DataAnnotations.DataTypeAttribute dataType" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="dataType" Type="System.ComponentModel.DataAnnotations.DataType" />
</Parameters>
<Docs>
<param name="dataType">The name of the type to associate with the data field.</param>
<summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DataAnnotations.DataTypeAttribute" /> class by using the specified type name.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The name is one of the values that are defined by the <xref:System.ComponentModel.DataAnnotations.DataType?displayProperty=nameWithType> enumeration.
## Examples
The following example shows how to use the <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute.%23ctor%28System.ComponentModel.DataAnnotations.DataType%29> constructor to specify an alternative type for a data field.
[!code-csharp[System.ComponentModel.DataAnnotations.DataTypeAttribute#11](~/samples/snippets/csharp/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/CS/Customer.cs#11)]
[!code-vb[System.ComponentModel.DataAnnotations.DataTypeAttribute#11](~/samples/snippets/visualbasic/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.DataTypeAttribute/VB/Customer.vb#11)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public DataTypeAttribute (string customDataType);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string customDataType) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.DataAnnotations.DataTypeAttribute.#ctor(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (customDataType As String)" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; DataTypeAttribute(System::String ^ customDataType);" />
<MemberSignature Language="F#" Value="new System.ComponentModel.DataAnnotations.DataTypeAttribute : string -&gt; System.ComponentModel.DataAnnotations.DataTypeAttribute" Usage="new System.ComponentModel.DataAnnotations.DataTypeAttribute customDataType" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="customDataType" Type="System.String" />
</Parameters>
<Docs>
<param name="customDataType">The name of the custom field template to associate with the data field.</param>
<summary>Initializes a new instance of the <see cref="T:System.ComponentModel.DataAnnotations.DataTypeAttribute" /> class by using the specified field template name.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method provides an alternative to using the <xref:System.ComponentModel.DataAnnotations.UIHintAttribute> attribute.
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="customDataType" /> is <see langword="null" /> or an empty string ("").</exception>
</Docs>
</Member>
<Member MemberName="CustomDataType">
<MemberSignature Language="C#" Value="public string CustomDataType { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string CustomDataType" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.DataAnnotations.DataTypeAttribute.CustomDataType" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CustomDataType As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ CustomDataType { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.CustomDataType : string" Usage="System.ComponentModel.DataAnnotations.DataTypeAttribute.CustomDataType" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the name of custom field template that is associated with the data field.</summary>
<value>The name of the custom field template that is associated with the data field.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DataType">
<MemberSignature Language="C#" Value="public System.ComponentModel.DataAnnotations.DataType DataType { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.ComponentModel.DataAnnotations.DataType DataType" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.DataAnnotations.DataTypeAttribute.DataType" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property DataType As DataType" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::ComponentModel::DataAnnotations::DataType DataType { System::ComponentModel::DataAnnotations::DataType get(); };" />
<MemberSignature Language="F#" Value="member this.DataType : System.ComponentModel.DataAnnotations.DataType" Usage="System.ComponentModel.DataAnnotations.DataTypeAttribute.DataType" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ComponentModel.DataAnnotations.DataType</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the type that is associated with the data field.</summary>
<value>One of the <see cref="T:System.ComponentModel.DataAnnotations.DataType" /> values.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DisplayFormat">
<MemberSignature Language="C#" Value="public System.ComponentModel.DataAnnotations.DisplayFormatAttribute DisplayFormat { get; protected set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.ComponentModel.DataAnnotations.DisplayFormatAttribute DisplayFormat" />
<MemberSignature Language="DocId" Value="P:System.ComponentModel.DataAnnotations.DataTypeAttribute.DisplayFormat" />
<MemberSignature Language="VB.NET" Value="Public Property DisplayFormat As DisplayFormatAttribute" />
<MemberSignature Language="C++ CLI" Value="public: property System::ComponentModel::DataAnnotations::DisplayFormatAttribute ^ DisplayFormat { public:&#xA;System::ComponentModel::DataAnnotations::DisplayFormatAttribute ^ get(); protected:&#xA; void set(System::ComponentModel::DataAnnotations::DisplayFormatAttribute ^ value); };" />
<MemberSignature Language="F#" Value="member this.DisplayFormat : System.ComponentModel.DataAnnotations.DisplayFormatAttribute with get, set" Usage="System.ComponentModel.DataAnnotations.DataTypeAttribute.DisplayFormat" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>set: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.ComponentModel.DataAnnotations.DisplayFormatAttribute</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a data-field display format.</summary>
<value>The data-field display format.</value>
<remarks>To be added.</remarks>
<altmember cref="T:System.ComponentModel.DataAnnotations.DisplayFormatAttribute" />
</Docs>
</Member>
<Member MemberName="GetDataTypeName">
<MemberSignature Language="C#" Value="public virtual string GetDataTypeName ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance string GetDataTypeName() cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.DataAnnotations.DataTypeAttribute.GetDataTypeName" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetDataTypeName () As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::String ^ GetDataTypeName();" />
<MemberSignature Language="F#" Value="abstract member GetDataTypeName : unit -&gt; string&#xA;override this.GetDataTypeName : unit -&gt; string" Usage="dataTypeAttribute.GetDataTypeName " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns the name of the type that is associated with the data field.</summary>
<returns>The name of the type associated with the data field.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The name of the type that is associated with the data field.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsValid">
<MemberSignature Language="C#" Value="public override bool IsValid (object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance bool IsValid(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.ComponentModel.DataAnnotations.DataTypeAttribute.IsValid(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function IsValid (value As Object) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override bool IsValid(System::Object ^ value);" />
<MemberSignature Language="F#" Value="override this.IsValid : obj -&gt; bool" Usage="dataTypeAttribute.IsValid value" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.Annotations</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.2.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.ComponentModel.DataAnnotations</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>3.5.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">The data field value to validate.</param>
<summary>Checks that the value of the data field is valid.</summary>
<returns>
<see langword="true" /> always.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method implements validation logic that is specific to the <xref:System.ComponentModel.DataAnnotations.DataTypeAttribute> attribute.
]]></format>
</remarks>
<altmember cref="T:System.ComponentModel.DataAnnotations.ValidationAttribute" />
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.