ModelStateDictionary.GetFieldValidationState(String) Method

Definition

Returns the aggregate ModelValidationState for items starting with the specified key.

C#
public Microsoft.AspNetCore.Mvc.ModelBinding.ModelValidationState GetFieldValidationState (string key);

Parameters

key
String

The key to look up model state errors for.

Returns

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

Applies to

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