Method AddModelErrors
AddModelErrors(ModelStateDictionary, IEnumerable<String>)
Adds a list of error descriptions with an empty key to the model state.
Declaration
public static void AddModelErrors(this ModelStateDictionary modelState, IEnumerable<string> errors)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary | modelState | The Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary instance to add error descriptions to. |
System.Collections.Generic.IEnumerable<String> | errors | Collection of error descriptions to add. |