CreditCardAttribute Class

 

Represents the credit card attributes for the ASP.NET.MVC.

Namespace:   Microsoft.Web.Mvc
Assembly:  Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)

Inheritance Hierarchy

System.Object
  System.Attribute
    System.ComponentModel.DataAnnotations.ValidationAttribute
      System.ComponentModel.DataAnnotations.DataTypeAttribute
        Microsoft.Web.Mvc.CreditCardAttribute

Syntax

[AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = false)]
public sealed class CreditCardAttribute : DataTypeAttribute, 
    IClientValidatable
[AttributeUsageAttribute(AttributeTargets::Property, AllowMultiple = false)]
public ref class CreditCardAttribute sealed : DataTypeAttribute, 
    IClientValidatable
[<Sealed>]
[<AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = false)>]
type CreditCardAttribute = 
    class
        inherit DataTypeAttribute
        interface IClientValidatable
    end
<AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple := False)>
Public NotInheritable Class CreditCardAttribute
    Inherits DataTypeAttribute
    Implements IClientValidatable

Constructors

Name Description
System_CAPS_pubmethod CreditCardAttribute()

Initializes a new instance of the CreditCardAttribute class.

Properties

Name Description
System_CAPS_pubproperty CustomDataType

(Inherited from DataTypeAttribute.)

System_CAPS_pubproperty DataType

(Inherited from DataTypeAttribute.)

System_CAPS_pubproperty DisplayFormat

(Inherited from DataTypeAttribute.)

System_CAPS_pubproperty ErrorMessage

(Inherited from ValidationAttribute.)

System_CAPS_pubproperty ErrorMessageResourceName

(Inherited from ValidationAttribute.)

System_CAPS_pubproperty ErrorMessageResourceType

(Inherited from ValidationAttribute.)

System_CAPS_pubproperty RequiresValidationContext

(Inherited from ValidationAttribute.)

System_CAPS_pubproperty TypeId

(Inherited from Attribute.)

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Attribute.)

System_CAPS_pubmethod FormatErrorMessage(String)

(Inherited from ValidationAttribute.)

System_CAPS_pubmethod GetClientValidationRules(ModelMetadata, ControllerContext)

Validates the client rules for the credit card attributes.

System_CAPS_pubmethod GetDataTypeName()

(Inherited from DataTypeAttribute.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Attribute.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod GetValidationResult(Object, ValidationContext)

(Inherited from ValidationAttribute.)

System_CAPS_pubmethod IsDefaultAttribute()

(Inherited from Attribute.)

System_CAPS_pubmethod IsValid(Object)

Determines whether the specified credit card number is valid.(Overrides DataTypeAttribute.IsValid(Object).)

System_CAPS_pubmethod Match(Object)

(Inherited from Attribute.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod Validate(Object, String)

(Inherited from ValidationAttribute.)

System_CAPS_pubmethod Validate(Object, ValidationContext)

(Inherited from ValidationAttribute.)

Explicit Interface Implementations

Name Description
System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

(Inherited from Attribute.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

(Inherited from Attribute.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.GetTypeInfoCount(UInt32)

(Inherited from Attribute.)

System_CAPS_pubinterfaceSystem_CAPS_privmethod _Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

(Inherited from Attribute.)

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

Microsoft.Web.Mvc Namespace

Return to top