RemoteAttribute 类

定义

RemoteAttributeBase 个控制器,用于将非干扰验证配置为向网站发送 Ajax 请求的控制器。 调用的操作应返回 JSON,指示该值是否有效。

public ref class RemoteAttribute : System::ComponentModel::DataAnnotations::ValidationAttribute, Microsoft::AspNetCore::Mvc::ModelBinding::Validation::IClientModelValidator
public ref class RemoteAttribute : Microsoft::AspNetCore::Mvc::RemoteAttributeBase
[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public class RemoteAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute, Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IClientModelValidator
[System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)]
public class RemoteAttribute : Microsoft.AspNetCore.Mvc.RemoteAttributeBase
[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type RemoteAttribute = class
    inherit ValidationAttribute
    interface IClientModelValidator
[<System.AttributeUsage(System.AttributeTargets.Property, AllowMultiple=false, Inherited=true)>]
type RemoteAttribute = class
    inherit RemoteAttributeBase
Public Class RemoteAttribute
Inherits ValidationAttribute
Implements IClientModelValidator
Public Class RemoteAttribute
Inherits RemoteAttributeBase
继承
RemoteAttribute
继承
属性
实现

注解

不对最终表单提交进行服务器端验证。

构造函数

RemoteAttribute()

初始化 RemoteAttribute 类的新实例。

RemoteAttribute(String)

初始化 RemoteAttribute 类的新实例。

RemoteAttribute(String, String)

初始化 RemoteAttribute 类的新实例。

RemoteAttribute(String, String, String)

初始化 RemoteAttribute 类的新实例。

属性

AdditionalFields

获取或设置客户端应包含在验证请求中的字段的逗号分隔名称。

AdditionalFields

获取或设置客户端应包含在验证请求中的字段的逗号分隔名称。

(继承自 RemoteAttributeBase)
HttpMethod

获取或设置发送验证请求时应使用的 HTTP 方法 ("Get""Post") 客户端。

HttpMethod

获取或设置发送验证请求时应使用的 HTTP 方法 ("Get""Post") 客户端。

(继承自 RemoteAttributeBase)
RouteData

RouteValueDictionary获取生成客户端应发送验证请求的 URL 时使用的 URL。

RouteData

RouteValueDictionary获取生成客户端应发送验证请求的 URL 时使用的 URL。

(继承自 RemoteAttributeBase)
RouteName

获取或设置生成客户端应发送验证请求的 URL 时使用的路由名称。

方法

AddValidation(ClientModelValidationContext)

RemoteAttributeBase 个控制器,用于将非干扰验证配置为向网站发送 Ajax 请求的控制器。 调用的操作应返回 JSON,指示该值是否有效。

AddValidation(ClientModelValidationContext)

将非侵入性验证 HTML 属性添加到 ClientModelValidationContext.

(继承自 RemoteAttributeBase)
FormatAdditionalFieldsForClientValidation(String)

格式化 propertyAdditionalFields 用于生成的 HTML。

FormatAdditionalFieldsForClientValidation(String)

格式化 propertyAdditionalFields 用于生成的 HTML。

(继承自 RemoteAttributeBase)
FormatErrorMessage(String)

RemoteAttributeBase 个控制器,用于将非干扰验证配置为向网站发送 Ajax 请求的控制器。 调用的操作应返回 JSON,指示该值是否有效。

FormatErrorMessage(String)

RemoteAttributeBase 个控制器,用于将非干扰验证配置为向网站发送 Ajax 请求的控制器。 调用的操作应返回 JSON,指示该值是否有效。

(继承自 RemoteAttributeBase)
FormatPropertyForClientValidation(String)

用于生成的 HTML 的格式 property

GetUrl(ClientModelValidationContext)

返回客户端应发送验证请求的 URL。

IsValid(Object)

RemoteAttributeBase 个控制器,用于将非干扰验证配置为向网站发送 Ajax 请求的控制器。 调用的操作应返回 JSON,指示该值是否有效。

IsValid(Object)

RemoteAttributeBase 个控制器,用于将非干扰验证配置为向网站发送 Ajax 请求的控制器。 调用的操作应返回 JSON,指示该值是否有效。

(继承自 RemoteAttributeBase)

适用于