RequiredAttribute Class
Important
This content is archived and is not being updated. For the latest documentation, see Microsoft Dynamics 365 product documentation. For the latest release plans, see Dynamics 365 and Microsoft Power Platform release plans.
Validation attribute to indicate that a property field or parameter is required.
Namespace: Microsoft.Dynamics.Commerce.Runtime.ComponentModel.DataAnnotations
Assembly: Microsoft.Dynamics.Commerce.Runtime.Framework (in Microsoft.Dynamics.Commerce.Runtime.Framework.dll)
Syntax
'Declaration
<AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple := False)> _
Public Class RequiredAttribute _
Inherits ValidationAttribute
'Usage
Dim instance As RequiredAttribute
[AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = false)]
public class RequiredAttribute : ValidationAttribute
[AttributeUsageAttribute(AttributeTargets::Property, AllowMultiple = false)]
public ref class RequiredAttribute : public ValidationAttribute
Inheritance Hierarchy
System.Object
System.Attribute
Microsoft.Dynamics.Commerce.Runtime.ComponentModel.DataAnnotations.ValidationAttribute
Microsoft.Dynamics.Commerce.Runtime.ComponentModel.DataAnnotations.RequiredAttribute
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.Dynamics.Commerce.Runtime.ComponentModel.DataAnnotations Namespace