RemoteAttribute RemoteAttribute RemoteAttribute Class

Definition

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

[System.AttributeUsage(System.AttributeTargets.Property)]
public class RemoteAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute, System.Web.Mvc.IClientValidatable
type RemoteAttribute = class
    inherit ValidationAttribute
    interface IClientValidatable
Public Class RemoteAttribute
Inherits ValidationAttribute
Implements IClientValidatable
Inheritance
RemoteAttributeRemoteAttributeRemoteAttribute
Attributes
Implements

Constructors

RemoteAttribute() RemoteAttribute() RemoteAttribute()

Initializes a new instance of the RemoteAttribute class.

RemoteAttribute(String) RemoteAttribute(String) RemoteAttribute(String)

Initializes a new instance of the RemoteAttribute class using the specified route name.

RemoteAttribute(String, String) RemoteAttribute(String, String) RemoteAttribute(String, String)

Initializes a new instance of the RemoteAttribute class using the specified action-method name and controller name.

RemoteAttribute(String, String, String) RemoteAttribute(String, String, String) RemoteAttribute(String, String, String)

Initializes a new instance of the RemoteAttribute class using the specified action-method name, controller name, and area name.

RemoteAttribute(String, String, AreaReference) RemoteAttribute(String, String, AreaReference) RemoteAttribute(String, String, AreaReference)

Initializes a new instance of the RemoteAttribute class.

Properties

AdditionalFields AdditionalFields AdditionalFields

Gets or sets the additional fields that are required for validation.

HttpMethod HttpMethod HttpMethod

Gets or sets the HTTP method used for remote validation.

RouteData RouteData RouteData

Gets the route data dictionary.

RouteName RouteName RouteName

Gets or sets the route name.

Routes Routes Routes

Gets the route collection from the route table.

Methods

FormatAdditionalFieldsForClientValidation(String) FormatAdditionalFieldsForClientValidation(String) FormatAdditionalFieldsForClientValidation(String)

Returns a comma-delimited string of validation field names.

FormatErrorMessage(String) FormatErrorMessage(String) FormatErrorMessage(String)

Formats the error message that is displayed when validation fails.

FormatPropertyForClientValidation(String) FormatPropertyForClientValidation(String) FormatPropertyForClientValidation(String)

Formats the property for client validation by prepending an asterisk (*) and a dot.

GetClientValidationRules(ModelMetadata, ControllerContext) GetClientValidationRules(ModelMetadata, ControllerContext) GetClientValidationRules(ModelMetadata, ControllerContext)

Gets a list of client validation rules for the property.

GetUrl(ControllerContext) GetUrl(ControllerContext) GetUrl(ControllerContext)

Gets the URL for the remote validation call.

IsValid(Object) IsValid(Object) IsValid(Object)

This method always returns true.

Applies to