ModelStateDictionary.IsValidField Method (String)
.NET Framework (current version)
Determines whether there are any ModelError objects that are associated with the specified key or that are prefixed with the specified key.
Assembly: System.Web (in System.Web.dll)
Parameters
- key
-
Type:
System.String
The key.
Return Value
Type: System.Booleantrue if any ModelError objects are associated with the specified key or prefixed with the specified key; otherwise, false. If the key is not found in the dictionary, this method returns true.
| Exception | Condition |
|---|---|
| ArgumentNullException | The key parameter is null. |
.NET Framework
Available since 4.5
Available since 4.5
Show: