2 writes to ModelState
Microsoft.AspNetCore.Mvc.Abstractions (2)
ActionContext.cs (2)
24
ModelState
= new ModelStateDictionary();
75
ModelState
= modelState;
93 references to ModelState
Microsoft.AspNetCore.Mvc.Abstractions (1)
ActionContext.cs (1)
36
actionContext.
ModelState
)
Microsoft.AspNetCore.Mvc.Core (20)
ApiBehaviorOptions.cs (1)
32
/// <see cref="ActionContext.
ModelState
"/> is invalid is suppressed. <seealso cref="InvalidModelStateResponseFactory"/>.
ApplicationModels\InvalidModelStateFilterConvention.cs (1)
11
/// to <see cref="ActionModel"/> that responds to invalid <see cref="ActionContext.
ModelState
"/>
ControllerBase.cs (1)
57
public ModelStateDictionary ModelState => ControllerContext.
ModelState
;
DependencyInjection\ApiBehaviorOptionsSetup.cs (1)
32
var problemDetails = problemDetailsFactory.CreateValidationProblemDetails(context.HttpContext, context.
ModelState
);
Infrastructure\ControllerActionInvoker.cs (1)
625
var validationState = context.
ModelState
.ValidationState;
Infrastructure\ControllerActionInvokerProvider.cs (3)
77
controllerContext.
ModelState
.MaxAllowedErrors = _maxModelValidationErrors;
78
controllerContext.
ModelState
.MaxValidationDepth = _maxValidationDepth;
79
controllerContext.
ModelState
.MaxStateDepth = _maxModelBindingRecursionDepth;
Infrastructure\ModelStateInvalidFilter.cs (2)
13
/// A <see cref="IActionFilter"/> that responds to invalid <see cref="ActionContext.
ModelState
"/>. This filter is
76
if (context.Result == null && !context.
ModelState
.IsValid)
ModelBinding\CompositeValueProvider.cs (1)
90
actionContext.
ModelState
.TryAddModelException(key: string.Empty, exception);
ModelBinding\DefaultModelBindingContext.cs (1)
228
ModelState = actionContext.
ModelState
,
ModelBinding\ModelBindingHelper.cs (1)
239
var modelState = actionContext.
ModelState
;
ModelBinding\ParameterBinder.cs (1)
187
actionContext.
ModelState
.TryAddModelError(modelName, message);
ModelBinding\UnsupportedContentTypeFilter.cs (2)
13
/// <see cref="ActionContext.
ModelState
"/> and short-circuits the pipeline
37
var modelState = context.
ModelState
;
ModelBinding\Validation\ValidationVisitor.cs (1)
48
ModelState = actionContext.
ModelState
;
Routing\ControllerRequestDelegateFactory.cs (3)
94
controllerContext.
ModelState
.MaxAllowedErrors = _maxModelValidationErrors;
95
controllerContext.
ModelState
.MaxValidationDepth = _maxValidationDepth;
96
controllerContext.
ModelState
.MaxStateDepth = _maxModelBindingRecursionDepth;
Microsoft.AspNetCore.Mvc.Razor (1)
RazorPagePropertyActivator.cs (1)
64
return _rootFactory(_metadataProvider, context.
ModelState
);
Microsoft.AspNetCore.Mvc.RazorPages (6)
Infrastructure\PageActionInvokerProvider.cs (1)
91
ViewData = cacheEntry.ViewDataFactory(_modelMetadataProvider, actionContext.
ModelState
),
Infrastructure\PageRequestDelegateFactory.cs (1)
105
pageContext.ViewData = cacheEntry.ViewDataFactory(_modelMetadataProvider, pageContext.
ModelState
);
PageBase.cs (1)
62
public ModelStateDictionary ModelState => PageContext?.
ModelState
!;
PageLoggerExtensions.cs (2)
92
var validationState = context.
ModelState
.ValidationState;
115
var validationState = context.
ModelState
.ValidationState;
PageModel.cs (1)
81
public ModelStateDictionary ModelState => PageContext.
ModelState
;
Microsoft.AspNetCore.Mvc.ViewFeatures (65)
Controller.cs (1)
46
_viewData = new ViewDataDictionary(new EmptyModelMetadataProvider(), ControllerContext.
ModelState
);
IHtmlGenerator.cs (1)
511
/// <see cref="ActionContext.
ModelState
"/> contains an error for the <paramref name="expression"/>.
Rendering\HtmlHelperInputExtensions.cs (24)
18
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
42
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
72
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
104
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
129
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
152
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
180
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
276
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
308
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
347
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
385
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
416
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
439
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
467
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
500
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
535
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
562
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
594
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
628
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
653
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
684
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
712
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
746
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
773
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
Rendering\HtmlHelperSelectExtensions.cs (11)
19
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
50
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
90
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
124
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
163
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
201
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
236
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
280
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
319
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
349
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
383
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
Rendering\HtmlHelperValueExtensions.cs (4)
16
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
37
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
62
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
82
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
Rendering\IHtmlHelper.cs (10)
172
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
176
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
256
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
402
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
447
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
521
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
525
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
613
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
638
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
718
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
Rendering\IHtmlHelperOfT.cs (10)
26
/// the <see cref="ActionContext.
ModelState
"/> entry with full name.
29
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
118
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
191
/// the <see cref="ActionContext.
ModelState
"/> entry with full name or
240
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
305
/// the <see cref="ActionContext.
ModelState
"/> entry with full name.
308
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
340
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
367
/// the <see cref="ActionContext.
ModelState
"/> entry with full name,
425
/// the <see cref="ActionContext.
ModelState
"/> entry with full name, or
Rendering\ViewContext.cs (1)
34
ViewData = new ViewDataDictionary(new EmptyModelMetadataProvider(),
ModelState
);
ViewComponentResultExecutor.cs (1)
77
viewData = new ViewDataDictionary(_modelMetadataProvider, context.
ModelState
);
ViewDataDictionaryControllerPropertyActivator.cs (1)
92
context.
ModelState
);
ViewExecutor.cs (1)
149
viewData = new ViewDataDictionary(ModelMetadataProvider, actionContext.
ModelState
);