DefaultModelBindingMessageProvider Class

Definition

Read / write ModelBindingMessageProvider implementation.

C#
public class DefaultModelBindingMessageProvider : Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.ModelBindingMessageProvider
Inheritance
DefaultModelBindingMessageProvider

Constructors

Properties

AttemptedValueIsInvalidAccessor

Error message the model binding system adds when Exception is of type FormatException or OverflowException, value is known, and error is associated with a property.

MissingBindRequiredValueAccessor

Error message the model binding system adds when a property with an associated BindRequiredAttribute is not bound.

MissingKeyOrValueAccessor

Error message the model binding system adds when either the key or the value of a KeyValuePair<TKey,TValue> is bound but not both.

MissingRequestBodyRequiredValueAccessor

Error message the model binding system adds when no value is provided for the request body, but a value is required.

NonPropertyAttemptedValueIsInvalidAccessor

Error message the model binding system adds when Exception is of type FormatException or OverflowException, value is known, and error is associated with a collection element or parameter.

NonPropertyUnknownValueIsInvalidAccessor

Error message the model binding system adds when Exception is of type FormatException or OverflowException, value is unknown, and error is associated with a collection element or parameter.

NonPropertyValueMustBeANumberAccessor

Error message HTML and tag helpers add for client-side validation of numeric formats. Visible in the browser if the field for a float (for example) collection element or action parameter does not have a correctly-formatted value.

UnknownValueIsInvalidAccessor

Error message the model binding system adds when Exception is of type FormatException or OverflowException, value is unknown, and error is associated with a property.

ValueIsInvalidAccessor

Fallback error message HTML and tag helpers display when a property is invalid but the ModelErrors have nullErrorMessages.

ValueMustBeANumberAccessor

Error message HTML and tag helpers add for client-side validation of numeric formats. Visible in the browser if the field for a float (for example) property does not have a correctly-formatted value.

ValueMustNotBeNullAccessor

Error message the model binding system adds when a null value is bound to a non-Nullable property.

Methods

Applies to

Produk Versi
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0