RemoteAttributeBase RemoteAttributeBase RemoteAttributeBase RemoteAttributeBase Class

Definition

A ValidationAttribute which configures Unobtrusive validation to send an Ajax request to the web site. The invoked endpoint should return JSON indicating whether the value is valid.

public ref class RemoteAttributeBase abstract : System::ComponentModel::DataAnnotations::ValidationAttribute, Microsoft::AspNetCore::Mvc::ModelBinding::Validation::IClientModelValidator
[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public abstract class RemoteAttributeBase : System.ComponentModel.DataAnnotations.ValidationAttribute, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidator
type RemoteAttributeBase = class
    inherit ValidationAttribute
    interface IClientModelValidator
Public MustInherit Class RemoteAttributeBase
Inherits ValidationAttribute
Implements IClientModelValidator
Inheritance
RemoteAttributeBaseRemoteAttributeBaseRemoteAttributeBaseRemoteAttributeBase
Derived
Attributes
Implements

Remarks

Does no server-side validation of the final form submission.

Constructors

RemoteAttributeBase() RemoteAttributeBase() RemoteAttributeBase() RemoteAttributeBase()

Properties

AdditionalFields AdditionalFields AdditionalFields AdditionalFields

Gets or sets the comma-separated names of fields the client should include in a validation request.

HttpMethod HttpMethod HttpMethod HttpMethod

Gets or sets the HTTP method ("Get" or "Post") client should use when sending a validation request.

RouteData RouteData RouteData RouteData

Gets the RouteValueDictionary used when generating the URL where client should send a validation request.

Methods

AddValidation(ClientModelValidationContext) AddValidation(ClientModelValidationContext) AddValidation(ClientModelValidationContext) AddValidation(ClientModelValidationContext)

Adds Unobtrusive validation HTML attributes to ClientModelValidationContext.

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

Formats property and AdditionalFields for use in generated HTML.

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

Formats property for use in generated HTML.

GetUrl(ClientModelValidationContext) GetUrl(ClientModelValidationContext) GetUrl(ClientModelValidationContext) GetUrl(ClientModelValidationContext)

Returns the URL where the client should send a validation request.

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

Applies to