Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
RemoteAttribute Class
Definition
- Namespace:
- Microsoft.AspNetCore.Mvc
- Assembly:
- Microsoft.AspNetCore.Mvc.ViewFeatures.dll
- Package:
- Microsoft.AspNetCore.Mvc.ViewFeatures v1.0.0
- Package:
- Microsoft.AspNetCore.Mvc.ViewFeatures v1.1.0
- Package:
- Microsoft.AspNetCore.App.Ref v10.0.0
- Package:
- Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
- Package:
- Microsoft.AspNetCore.Mvc.ViewFeatures v2.0.0
- Package:
- Microsoft.AspNetCore.Mvc.ViewFeatures v2.1.0
- Package:
- Microsoft.AspNetCore.Mvc.ViewFeatures v2.2.0
- Package:
- Microsoft.AspNetCore.App.Ref v3.0.1
- Package:
- Microsoft.AspNetCore.App.Ref v3.1.10
- Package:
- Microsoft.AspNetCore.App.Ref v5.0.0
- Package:
- Microsoft.AspNetCore.App.Ref v6.0.36
- Package:
- Microsoft.AspNetCore.App.Ref v7.0.5
- Package:
- Microsoft.AspNetCore.App.Ref v8.0.19
- Package:
- Microsoft.AspNetCore.App.Ref v9.0.8
- Source:
- RemoteAttribute.cs
- Source:
- RemoteAttribute.cs
- Source:
- RemoteAttribute.cs
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A RemoteAttributeBase for controllers which configures Unobtrusive validation to send an Ajax request to the web site. The invoked action should return JSON indicating whether the value is valid.
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
- Inheritance
-
RemoteAttribute
- Inheritance
- Attributes
- Implements
Remarks
Does no server-side validation of the final form submission.
Constructors
| Name | Description |
|---|---|
| RemoteAttribute() |
Initializes a new instance of the RemoteAttribute class. |
| RemoteAttribute(String, String, String) |
Initializes a new instance of the RemoteAttribute class. |
| RemoteAttribute(String, String) |
Initializes a new instance of the RemoteAttribute class. |
| RemoteAttribute(String) |
Initializes a new instance of the RemoteAttribute class. |
Properties
| Name | Description |
|---|---|
| AdditionalFields |
Gets or sets the comma-separated names of fields the client should include in a validation request. |
| AdditionalFields |
Gets or sets the comma-separated names of fields the client should include in a validation request. (Inherited from RemoteAttributeBase) |
| HttpMethod |
Gets or sets the HTTP method ( |
| HttpMethod |
Gets or sets the HTTP method ( |
| RouteData |
Gets the RouteValueDictionary used when generating the URL where client should send a validation request. |
| RouteData |
Gets the RouteValueDictionary used when generating the URL where client should send a validation request. (Inherited from RemoteAttributeBase) |
| RouteName |
Gets or sets the route name used when generating the URL where client should send a validation request. |
Methods
| Name | Description |
|---|---|
| AddValidation(ClientModelValidationContext) | |
| AddValidation(ClientModelValidationContext) |
Adds Unobtrusive validation HTML attributes to ClientModelValidationContext. (Inherited from RemoteAttributeBase) |
| FormatAdditionalFieldsForClientValidation(String) |
Formats |
| FormatAdditionalFieldsForClientValidation(String) |
Formats |
| FormatErrorMessage(String) | Applies formatting to an error message, based on the data field where the error occurred. |
| FormatErrorMessage(String) | (Inherited from RemoteAttributeBase) |
| FormatPropertyForClientValidation(String) |
Formats |
| GetUrl(ClientModelValidationContext) |
Returns the URL where the client should send a validation request. |
| IsValid(Object) | Determines whether the specified value of the object is valid. |
| IsValid(Object) | (Inherited from RemoteAttributeBase) |
Applies to
Feedback
Was this page helpful?
