ModelStateDictionary.GetValidationState(String) 方法

定义

返回 ModelValidationStatekey

public:
 Microsoft::AspNetCore::Mvc::ModelBinding::ModelValidationState GetValidationState(System::String ^ key);
public Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState GetValidationState (string key);
member this.GetValidationState : string -> Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState
Public Function GetValidationState (key As String) As ModelValidationState

参数

key
String

要查找其模型状态错误的键。

返回

Unvalidated如果找不到指定键的条目,则返回 ;Invalid如果找到具有一个或多个模型状态错误的实例,则返回 ;Valid否则返回 。

适用于