Share via


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
RemoteAttribute
Attributes
Implements

Constructors

RemoteAttribute()

Initializes a new instance of the RemoteAttribute class.

RemoteAttribute(String, String, AreaReference)

Initializes a new instance of the RemoteAttribute class.

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)

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

RemoteAttribute(String)

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

Properties

AdditionalFields

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

HttpMethod

Gets or sets the HTTP method used for remote validation.

RouteData

Gets the route data dictionary.

RouteName

Gets or sets the route name.

Routes

Gets the route collection from the route table.

Methods

FormatAdditionalFieldsForClientValidation(String)

Returns a comma-delimited string of validation field names.

FormatErrorMessage(String)

Formats the error message that is displayed when validation fails.

FormatPropertyForClientValidation(String)

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

GetClientValidationRules(ModelMetadata, ControllerContext)

Gets a list of client validation rules for the property.

GetUrl(ControllerContext)

Gets the URL for the remote validation call.

IsValid(Object)

This method always returns true.

Applies to