ModelStateDictionary.GetValidationState(String) Method

Definition

Returns ModelValidationState for the key.

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

Parameters

key
String

The key to look up model state errors for.

Returns

ModelValidationState

Returns Unvalidated if no entry is found for the specified key, Invalid if an instance is found with one or more model state errors; Valid otherwise.

Applies to