ModelStateDictionary.IsValidField(String) Method

Definition

Determines whether any error messages are associated with the specified key.

public bool IsValidField (string key);
member this.IsValidField : string -> bool
Public Function IsValidField (key As String) As Boolean

Parameters

key
String

The key.

Returns

true if no error messages are associated with the specified key, or the specified key does not exist; otherwise, false.

Exceptions

key is null.

Applies to