Export (0) Print
Expand All

RemoteAttribute Class

Provides an attribute that uses the jQuery validation plug-in remote validator.

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

public class RemoteAttribute extends ValidationAttribute implements IClientValidatable

The RemoteAttribute type exposes the following members.

  NameDescription
Protected methodRemoteAttribute()Initializes a new instance of the RemoteAttribute class.
Public methodRemoteAttribute(String)Initializes a new instance of the RemoteAttribute class using the specified route name.
Public methodRemoteAttribute(String, String)Initializes a new instance of the RemoteAttribute class using the specified action-method name and controller name.
Public methodRemoteAttribute(String, String, String)Initializes a new instance of the RemoteAttribute class using the specified action-method name, controller name, and area name.
Public methodRemoteAttribute(String, String, AreaReference)Initializes a new instance of the RemoteAttribute class.
Top

  NameDescription
Public propertyAdditionalFieldsGets or sets the additional fields that are required for validation.
Public propertyErrorMessage (Inherited from ValidationAttribute.)
Public propertyErrorMessageResourceName (Inherited from ValidationAttribute.)
Public propertyErrorMessageResourceType (Inherited from ValidationAttribute.)
Protected propertyErrorMessageString (Inherited from ValidationAttribute.)
Public propertyHttpMethodGets or sets the HTTP method used for remote validation.
Public propertyRequiresValidationContext (Inherited from ValidationAttribute.)
Protected propertyRouteDataGets the route data dictionary.
Protected propertyRouteNameGets or sets the route name.
Protected propertyRoutesGets the route collection from the route table.
Public propertyTypeId (Inherited from Attribute.)
Top

  NameDescription
Public methodEquals (Inherited from Attribute.)
Protected methodFinalize (Inherited from Object.)
Public methodFormatAdditionalFieldsForClientValidationReturns a comma-delimited string of validation field names.
Public methodFormatErrorMessageFormats the error message that is displayed when validation fails. (Overrides ValidationAttribute.FormatErrorMessage(String).)
Public methodStatic memberFormatPropertyForClientValidationFormats the property for client validation by prepending an asterisk (*) and a dot.
Public methodGetClientValidationRulesGets a list of client validation rules for the property.
Public methodGetHashCode (Inherited from Attribute.)
Public methodGetType (Inherited from Object.)
Protected methodGetUrlGets the URL for the remote validation call.
Public methodGetValidationResult (Inherited from ValidationAttribute.)
Public methodIsDefaultAttribute (Inherited from Attribute.)
Public methodIsValid(Object)This method always returns true. (Overrides ValidationAttribute.IsValid(Object).)
Protected methodIsValid(Object, ValidationContext) (Inherited from ValidationAttribute.)
Public methodMatch (Inherited from Attribute.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Public methodValidate(Object, String) (Inherited from ValidationAttribute.)
Public methodValidate(Object, ValidationContext) (Inherited from ValidationAttribute.)
Top

This attribute enables a client-side validation call to the server where the actual validation is performed. The client side version of this class is ModelClientValidationRemoteRule.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft