ModelStateDictionary.IsValidField Method (String)

 

Determines whether there are any ModelError objects that are associated with or prefixed with the specified key.

Namespace:   System.Web.Http.ModelBinding
Assembly:  System.Web.Http (in System.Web.Http.dll)

Syntax

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

Parameters

Return Value

Type: System.Boolean

true if the model-state dictionary contains a value that is associated with the specified key; otherwise, false.

See Also

ModelStateDictionary Class
System.Web.Http.ModelBinding Namespace

Return to top