ModelStateDictionary.GetValidationState(String) Method
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.
Returns ModelValidationState for the key
.
public:
Microsoft::AspNetCore::Mvc::ModelBinding::ModelValidationState GetValidationState(System::String ^ key);
C#
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
The key to look up model state errors for.
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.
Product | Versions |
---|---|
ASP.NET Core | 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0 |