Share via


CollectionModelBinder<TElement>.AddErrorIfBindingRequired Method

Definition

protected:
 void AddErrorIfBindingRequired(Microsoft::AspNetCore::Mvc::ModelBinding::ModelBindingContext ^ bindingContext);
protected void AddErrorIfBindingRequired (Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext);
member this.AddErrorIfBindingRequired : Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext -> unit
Protected Sub AddErrorIfBindingRequired (bindingContext As ModelBindingContext)

Parameters

Remarks

For back-compatibility reasons, Result must have IsModelSet equal to true when a top-level model is not bound. Therefore, ParameterBinder can not detect a IsBindingRequired failure for collections. Add the error here.

Applies to