MvcOptions.AllowEmptyInputInBodyModelBinding Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the flag which decides whether body model binding (for example, on an
action method parameter with FromBodyAttribute) should treat empty
input as valid. false
by default.
public:
property bool AllowEmptyInputInBodyModelBinding { bool get(); void set(bool value); };
public bool AllowEmptyInputInBodyModelBinding { get; set; }
member this.AllowEmptyInputInBodyModelBinding : bool with get, set
Public Property AllowEmptyInputInBodyModelBinding As Boolean
Property Value
Examples
When false
, actions that model bind the request body (for example,
using FromBodyAttribute) will register an error in the
ModelStateDictionary if the incoming request body is empty.