ModelStateDictionary.MaxAllowedErrors 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 maximum allowed model state errors in this instance of ModelStateDictionary.
Defaults to 200
.
public:
property int MaxAllowedErrors { int get(); void set(int value); };
public int MaxAllowedErrors { get; set; }
member this.MaxAllowedErrors : int with get, set
Public Property MaxAllowedErrors As Integer
Property Value
Remarks
ModelStateDictionary tracks the number of model errors added by calls to AddModelError(String, Exception, ModelMetadata) or TryAddModelError(String, Exception, ModelMetadata). Once the value of MaxAllowedErrors - 1
is reached, if another attempt is made to add an error, the error message will be ignored and a TooManyModelErrorsException will be added.
Errors added via modifying ModelStateEntry directly do not count towards this limit.