129 references to Invalid
Microsoft.AspNetCore.Mvc.Abstractions (10)
ModelBinding\ModelStateDictionary.cs (8)
357
modelState.ValidationState = ModelValidationState.
Invalid
;
371
/// key, <see cref="ModelValidationState.
Invalid
"/> if at least one instance is found with one or more model
386
/// key, <see cref="ModelValidationState.
Invalid
"/> if an instance is found with one or more model
410
if (modelState.ValidationState == ModelValidationState.
Invalid
)
430
if (modelState.ValidationState == ModelValidationState.
Invalid
)
638
if (node.ValidationState == ModelValidationState.
Invalid
)
657
if (validationState == null || entryState == ModelValidationState.
Invalid
)
681
modelState.ValidationState = ModelValidationState.
Invalid
;
ModelBinding\ModelValidationState.cs (2)
29
/// For aggregate validity, the validation of a <see cref="ModelStateEntry"/> is <see cref="
Invalid
"/>
30
/// if either the entry or one of the descendants is <see cref="
Invalid
"/> and none are <see cref="Unvalidated"/>.
Microsoft.AspNetCore.Mvc.Abstractions.Test (9)
ModelBinding\ModelStateDictionaryTest.cs (9)
398
Assert.Equal(ModelValidationState.
Invalid
, validationState);
431
Assert.Equal(ModelValidationState.
Invalid
, validationState);
464
Assert.Equal(ModelValidationState.
Invalid
, validationState);
710
Assert.Equal(ModelValidationState.
Invalid
, validationState);
729
Assert.Equal(ModelValidationState.
Invalid
, validationState);
1301
Assert.Equal(ModelValidationState.
Invalid
, dictionary["Property3"].ValidationState);
1336
Assert.Equal(ModelValidationState.
Invalid
, dictionary["ProductName"].ValidationState);
1439
Assert.Equal(ModelValidationState.
Invalid
, entry.Value.ValidationState);
1558
Assert.Equal(ModelValidationState.
Invalid
, value.ValidationState);
Microsoft.AspNetCore.Mvc.Core (5)
ModelBinding\Validation\ValidationVisitor.cs (5)
182
if (entry != null && entry.ValidationState != ModelValidationState.
Invalid
)
209
if (state != ModelValidationState.
Invalid
)
243
if (state == ModelValidationState.
Invalid
)
337
ModelState.GetFieldValidationState(key) != ModelValidationState.
Invalid
)
466
if (entry.Value.ValidationState != ModelValidationState.
Invalid
)
Microsoft.AspNetCore.Mvc.Core.Test (47)
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (1)
725
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (1)
869
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
ModelBinding\Binders\SimpleTypeModelBinderTest.cs (1)
328
Assert.Equal(ModelValidationState.
Invalid
, entry.Value.ValidationState);
ModelBinding\Binders\TryParseTypeModelBinderTest.cs (1)
254
Assert.Equal(ModelValidationState.
Invalid
, entry.Value.ValidationState);
ModelBinding\ModelBindingHelperTest.cs (3)
662
Assert.Equal(ModelValidationState.
Invalid
, dictionary["Unrelated"].ValidationState);
687
Assert.Equal(ModelValidationState.
Invalid
, dictionary["Unrelated"].ValidationState);
728
Assert.Equal(ModelValidationState.
Invalid
, dictionary["Unrelated"].ValidationState);
ModelBinding\ParameterBinderTest.cs (4)
575
Assert.Equal(ModelValidationState.
Invalid
, kvp.Value.ValidationState);
636
Assert.Equal(ModelValidationState.
Invalid
, kvp.Value.ValidationState);
643
Assert.Equal(ModelValidationState.
Invalid
, kvp.Value.ValidationState);
701
Assert.Equal(ModelValidationState.
Invalid
, keyValuePair.Value.ValidationState);
ModelBinding\Validation\DefaultObjectValidatorTests.cs (36)
238
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
243
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
313
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
345
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
380
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
385
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
390
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
490
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
495
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
500
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
505
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
545
Assert.Equal(ModelValidationState.
Invalid
, entry.Value.ValidationState);
554
Assert.Equal(ModelValidationState.
Invalid
, entry.Value.ValidationState);
561
Assert.Equal(ModelValidationState.
Invalid
, entry.Value.ValidationState);
568
Assert.Equal(ModelValidationState.
Invalid
, entry.Value.ValidationState);
671
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
707
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
743
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
804
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
809
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
814
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
819
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
847
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
852
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
857
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
862
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
1061
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
1066
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
1071
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
1076
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
1248
Assert.Equal(ModelValidationState.
Invalid
, kvp.Value.ValidationState);
1255
Assert.Equal(ModelValidationState.
Invalid
, kvp.Value.ValidationState);
1334
[InlineData(true, ModelValidationState.
Invalid
)]
1432
modelState["Property2"].ValidationState = ModelValidationState.
Invalid
;
1438
Assert.Equal(ModelValidationState.
Invalid
, modelState.ValidationState);
1445
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
Microsoft.AspNetCore.Mvc.IntegrationTests (58)
BodyValidationIntegrationTests.cs (2)
640
Assert.Equal(ModelValidationState.
Invalid
, street.ValidationState);
737
Assert.Equal(ModelValidationState.
Invalid
, street.ValidationState);
CollectionModelBinderIntegrationTest.cs (8)
330
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
336
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
389
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
393
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
440
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
444
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
535
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
539
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
DictionaryModelBinderIntegrationTest.cs (5)
814
var entry = Assert.Single(modelState, kvp => kvp.Value.ValidationState == ModelValidationState.
Invalid
);
1332
Assert.Equal(ModelValidationState.
Invalid
, kvp.Value.ValidationState);
1348
Assert.Equal(ModelValidationState.
Invalid
, kvp.Value.ValidationState);
1485
Assert.Equal(ModelValidationState.
Invalid
, kvp.Value.ValidationState);
1501
Assert.Equal(ModelValidationState.
Invalid
, kvp.Value.ValidationState);
NullableReferenceTypeIntegrationTest.cs (3)
54
Assert.Equal(ModelValidationState.
Invalid
, kvp.Value.ValidationState);
141
Assert.Equal(ModelValidationState.
Invalid
, kvp.Value.ValidationState);
196
Assert.Equal(ModelValidationState.
Invalid
, kvp.Value.ValidationState);
SimpleTypeModelBinderIntegrationTest.cs (2)
402
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
462
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
ValidationIntegrationTests.cs (19)
234
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
323
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
417
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
507
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
595
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
670
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
977
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
1084
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
1378
Assert.Equal(ModelValidationState.
Invalid
, state.Value.ValidationState);
1426
Assert.Equal(ModelValidationState.
Invalid
, state.ValidationState);
1951
Assert.Equal(ModelValidationState.
Invalid
, entry.Value.ValidationState);
2105
Assert.Equal(ModelValidationState.
Invalid
, modelState.ValidationState);
2108
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
2176
Assert.Equal(ModelValidationState.
Invalid
, modelState.ValidationState);
2184
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
2288
Assert.Equal(ModelValidationState.
Invalid
, modelState.ValidationState);
2301
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
2395
Assert.Equal(ModelValidationState.
Invalid
, modelState.ValidationState);
2403
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
ValidationWithRecordIntegrationTests.cs (19)
222
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
304
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
389
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
472
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
554
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
846
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
946
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
1222
Assert.Equal(ModelValidationState.
Invalid
, state.Value.ValidationState);
1270
Assert.Equal(ModelValidationState.
Invalid
, state.ValidationState);
1754
Assert.Equal(ModelValidationState.
Invalid
, entry.Value.ValidationState);
1896
Assert.Equal(ModelValidationState.
Invalid
, modelState.ValidationState);
1899
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
1967
Assert.Equal(ModelValidationState.
Invalid
, modelState.ValidationState);
1975
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
2079
Assert.Equal(ModelValidationState.
Invalid
, modelState.ValidationState);
2092
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
2183
Assert.Equal(ModelValidationState.
Invalid
, modelState.ValidationState);
2191
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);
2453
Assert.Equal(ModelValidationState.
Invalid
, entry.ValidationState);