ModelStateEntry.GetModelStateForProperty(String) Method

Definition

Gets the ModelStateEntry for a sub-property with the specified propertyName.

C#
public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry GetModelStateForProperty (string propertyName);
C#
public abstract Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateEntry? GetModelStateForProperty (string propertyName);

Parameters

propertyName
String

The property name to lookup.

Returns

The ModelStateEntry if a sub-property was found; otherwise null.

Remarks

This method returns any existing entry, even those with IsContainerNode with value true.

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