207 references to Valid
Microsoft.AspNetCore.Mvc.Abstractions (11)
ModelBinding\ModelMetadata.cs (1)
436
/// When <see langword="false"/>, validation can be assume that the model is valid (<see cref="ModelValidationState.
Valid
"/>) without
ModelBinding\ModelStateDictionary.cs (7)
163
return state == ModelValidationState.
Valid
|| state == ModelValidationState.Skipped;
168
public ModelValidationState ValidationState => GetValidity(_root, currentDepth: 0) ?? ModelValidationState.
Valid
;
372
/// state errors; <see cref="ModelValidationState.
Valid
"/> otherwise.</returns>
387
/// state errors; <see cref="ModelValidationState.
Valid
"/> otherwise.</returns>
402
/// <paramref name="key"/> as <see cref="ModelValidationState.
Valid
"/>.
417
modelState.ValidationState = ModelValidationState.
Valid
;
631
validationState = ModelValidationState.
Valid
;
ModelBinding\ModelValidationState.cs (3)
12
/// of the root node is <see cref="
Valid
"/>.
38
/// For aggregate validity, the validation of a <see cref="ModelStateEntry"/> is <see cref="
Valid
"/>
39
/// if the validity of the entry and all descendants is either <see cref="
Valid
"/> or <see cref="Skipped"/>.
Microsoft.AspNetCore.Mvc.Abstractions.Test (16)
ModelBinding\ModelStateDictionaryTest.cs (16)
123
Assert.Equal(ModelValidationState.
Valid
, dictionary.ValidationState);
139
Assert.Equal(ModelValidationState.
Valid
, dictionary.ValidationState);
212
Assert.Equal(ModelValidationState.
Valid
, source["key"].ValidationState);
226
Assert.Equal(ModelValidationState.
Valid
, source["key"].ValidationState);
241
Assert.Equal(ModelValidationState.
Valid
, source["key"].ValidationState);
415
Assert.Equal(ModelValidationState.
Valid
, validationState);
447
Assert.Equal(ModelValidationState.
Valid
, validationState);
481
Assert.Equal(ModelValidationState.
Valid
, validationState);
497
Assert.Equal(ModelValidationState.
Valid
, fieldValidationState);
512
Assert.Equal(ModelValidationState.
Valid
, validationState);
527
Assert.Equal(ModelValidationState.
Valid
, validationState);
744
Assert.Equal(ModelValidationState.
Valid
, validationState);
1353
Assert.Equal(ModelValidationState.
Valid
, dictionary["Product"].ValidationState);
1415
Assert.Equal(ModelValidationState.
Valid
, entry.Value.ValidationState);
1537
Assert.Equal(ModelValidationState.
Valid
, value.ValidationState);
1637
Assert.Equal(ModelValidationState.
Valid
, validationState);
Microsoft.AspNetCore.Mvc.Core (3)
ModelBinding\Validation\ValidationVisitor.cs (3)
184
entry.ValidationState = ModelValidationState.
Valid
;
254
entry.ValidationState = ModelValidationState.
Valid
;
350
item.Value.ValidationState = ModelValidationState.
Valid
;
Microsoft.AspNetCore.Mvc.Core.Test (31)
ModelBinding\Validation\DefaultObjectValidatorTests.cs (31)
43
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
70
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
176
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
180
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
208
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
212
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
281
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
377
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
636
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
667
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
703
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
773
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
777
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
929
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
933
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
937
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1005
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1009
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1013
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1017
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1053
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1057
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1148
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
1178
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
1215
Assert.Equal(ModelValidationState.
Valid
, entry.Value.ValidationState);
1378
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
1382
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1385
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1408
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
1412
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1442
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
Microsoft.AspNetCore.Mvc.IntegrationTests (146)
ActionParametersIntegrationTest.cs (6)
72
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
116
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
166
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
252
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
296
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
343
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
BinderTypeBasedModelBinderIntegrationTest.cs (5)
118
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
185
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
237
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
273
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
312
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
ByteArrayModelBinderIntegrationTest.cs (1)
64
Assert.Equal(ModelValidationState.
Valid
, entry.Value.ValidationState);
CollectionModelBinderIntegrationTest.cs (6)
483
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
488
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1166
Assert.Equal(ModelValidationState.
Valid
, kvp.Value.ValidationState);
1171
Assert.Equal(ModelValidationState.
Valid
, kvp.Value.ValidationState);
1215
Assert.Equal(ModelValidationState.
Valid
, kvp.Value.ValidationState);
1220
Assert.Equal(ModelValidationState.
Valid
, kvp.Value.ValidationState);
ComplexRecordIntegrationTest.cs (6)
2679
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2727
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2787
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2840
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
3090
Assert.Equal(ModelValidationState.
Valid
, kvp.Value.ValidationState);
3098
Assert.Equal(ModelValidationState.
Valid
, kvp.Value.ValidationState);
ComplexTypeIntegrationTestBase.cs (6)
2858
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2906
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2978
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
3031
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
3305
Assert.Equal(ModelValidationState.
Valid
, kvp.Value.ValidationState);
3313
Assert.Equal(ModelValidationState.
Valid
, kvp.Value.ValidationState);
DictionaryModelBinderIntegrationTest.cs (7)
130
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
135
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1269
Assert.Equal(ModelValidationState.
Valid
, kvp.Value.ValidationState);
1338
Assert.Equal(ModelValidationState.
Valid
, kvp.Value.ValidationState);
1343
Assert.Equal(ModelValidationState.
Valid
, kvp.Value.ValidationState);
1491
Assert.Equal(ModelValidationState.
Valid
, kvp.Value.ValidationState);
1496
Assert.Equal(ModelValidationState.
Valid
, kvp.Value.ValidationState);
FormCollectionModelBindingIntegrationTest.cs (1)
70
Assert.Equal(ModelValidationState.
Valid
, entry.Value.ValidationState);
FormFileModelBindingIntegrationTest.cs (14)
71
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
121
Assert.Equal(ModelValidationState.
Valid
, value.ValidationState);
172
Assert.Equal(ModelValidationState.
Valid
, value.ValidationState);
235
Assert.Equal(ModelValidationState.
Valid
, value.ValidationState);
243
Assert.Equal(ModelValidationState.
Valid
, value.ValidationState);
325
Assert.Equal(ModelValidationState.
Valid
, value.ValidationState);
331
Assert.Equal(ModelValidationState.
Valid
, value.ValidationState);
391
Assert.Equal(ModelValidationState.
Valid
, value.ValidationState);
397
Assert.Equal(ModelValidationState.
Valid
, value.ValidationState);
453
Assert.Equal(ModelValidationState.
Valid
, value.ValidationState);
461
Assert.Equal(ModelValidationState.
Valid
, value.ValidationState);
512
Assert.Equal(ModelValidationState.
Valid
, modelStateEntry.ValidationState);
601
Assert.Equal(ModelValidationState.
Valid
, modelStateEntry.ValidationState);
650
Assert.Equal(ModelValidationState.
Valid
, entry.Value.ValidationState);
HeaderModelBinderIntegrationTest.cs (13)
104
Assert.Equal(ModelValidationState.
Valid
, entry.Value.ValidationState);
146
Assert.Equal(ModelValidationState.
Valid
, entry.Value.ValidationState);
193
Assert.Equal(ModelValidationState.
Valid
, modelStateEntry.ValidationState);
240
Assert.Equal(ModelValidationState.
Valid
, modelStateEntry.ValidationState);
300
Assert.Equal(ModelValidationState.
Valid
, entry.Value.ValidationState);
366
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
375
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
384
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
393
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
402
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
411
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
420
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
429
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
SimpleTypeModelBinderIntegrationTest.cs (9)
63
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
107
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
151
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
228
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
272
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
357
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
700
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
746
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
790
Assert.Equal(ModelValidationState.
Valid
, modelState[key].ValidationState);
TryUpdateModelIntegrationTest.cs (24)
57
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
91
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
201
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
242
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
283
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
344
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
376
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
405
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
448
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
496
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
664
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
698
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
801
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
837
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
878
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
929
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
965
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
1013
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
1081
Assert.Equal(ModelValidationState.
Valid
, modelStateEntry.ValidationState);
1134
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
1205
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
1212
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
1260
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
1269
Assert.Equal(ModelValidationState.
Valid
, state.ValidationState);
ValidationIntegrationTests.cs (24)
1391
Assert.Equal(ModelValidationState.
Valid
, state.Value.ValidationState);
1643
Assert.Equal(ModelValidationState.
Valid
, state.Value.ValidationState);
1691
Assert.Equal(ModelValidationState.
Valid
, kvp.Value.ValidationState);
2004
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
2053
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
2058
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2063
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2113
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2118
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2181
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2189
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2241
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
2246
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2251
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2293
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2298
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2341
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
2346
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2400
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2445
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
2450
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2497
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
2502
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2547
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
ValidationWithRecordIntegrationTests.cs (24)
1235
Assert.Equal(ModelValidationState.
Valid
, state.Value.ValidationState);
1451
Assert.Equal(ModelValidationState.
Valid
, state.Value.ValidationState);
1497
Assert.Equal(ModelValidationState.
Valid
, kvp.Value.ValidationState);
1799
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
1844
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
1849
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1854
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1904
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1909
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1972
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
1980
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2032
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
2037
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2042
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2084
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2089
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2132
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
2137
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2188
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2233
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
2238
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2283
Assert.Equal(ModelValidationState.
Valid
, modelState.ValidationState);
2288
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);
2450
Assert.Equal(ModelValidationState.
Valid
, entry.ValidationState);