702 references to IsValid
BasicWebSite (12)
Areas\Area1\Controllers\RemoteAttribute_HomeController.cs (1)
25if (!ModelState.IsValid)
Controllers\BindPropertiesWithValidationController.cs (1)
27if (!ModelState.IsValid)
Controllers\HomeController.cs (1)
119if (!ModelState.IsValid)
Controllers\NonNullableController.cs (1)
19if (ModelState.IsValid)
Controllers\ReadFromThrowingRequestBodyController .cs (1)
17if (!ModelState.IsValid)
Controllers\RemoteAttribute_HomeController.cs (1)
23if (!ModelState.IsValid)
Controllers\RequestFormLimitsController.cs (4)
16if (!ModelState.IsValid) 28if (!ModelState.IsValid) 39if (!ModelState.IsValid) 52if (!ModelState.IsValid)
Controllers\RequestSizeLimitController.cs (2)
16if (!ModelState.IsValid) 28if (!ModelState.IsValid)
FilesWebSite (1)
Controllers\UploadFilesController.cs (1)
27if (!ModelState.IsValid)
FormatterWebSite (24)
Controllers\DoNotRespectBrowserAcceptHeaderController.cs (1)
34if (!ModelState.IsValid)
Controllers\HomeController.cs (5)
43=> ModelState.IsValid ? Ok() : ValidationProblem(); 47=> ModelState.IsValid ? Ok() : ValidationProblem(); 51=> ModelState.IsValid ? Ok() : ValidationProblem(); 56=> ModelState.IsValid ? Ok() : ValidationProblem(); 60=> ModelState.IsValid ? Ok() : ValidationProblem();
Controllers\InputFormatterController.cs (1)
12if (!ModelState.IsValid)
Controllers\JsonFormatterController.cs (4)
51if (!ModelState.IsValid) 63if (!ModelState.IsValid) 74if (!ModelState.IsValid) 116if (!ModelState.IsValid)
Controllers\JsonPatchController.cs (2)
15if (!ModelState.IsValid) 23if (!ModelState.IsValid)
Controllers\PolymorphicBindingController.cs (2)
13if (!ModelState.IsValid) 24if (!ModelState.IsValid)
Controllers\PolymorphicPropertyBindingController.cs (1)
17if (!ModelState.IsValid)
Controllers\SerializableErrorController.cs (1)
13if (!ModelState.IsValid)
Controllers\TopLevelValidationController.cs (1)
37if (ModelState.IsValid)
Controllers\ValidationController.cs (4)
14if (!ModelState.IsValid) 29if (ModelState.IsValid) 47if (ModelState.IsValid) 74if (!ModelState.IsValid)
Filters\ModelStateValidationFilterAttribute.cs (1)
13if (!context.ModelState.IsValid)
ValidateBodyParameterAttribute.cs (1)
15if (!context.ModelState.IsValid)
Identity.DefaultUI.WebSite (1)
Pages\Contoso\Login.cshtml.cs (1)
48if (!ModelState.IsValid)
Identity.ExternalClaims (12)
Pages\Account\ExternalLogin.cshtml.cs (1)
111if (ModelState.IsValid)
Pages\Account\ForgotPassword.cshtml.cs (1)
39if (ModelState.IsValid)
Pages\Account\Login.cshtml.cs (1)
72if (ModelState.IsValid)
Pages\Account\LoginWith2fa.cshtml.cs (1)
65if (!ModelState.IsValid)
Pages\Account\LoginWithRecoveryCode.cshtml.cs (1)
58if (!ModelState.IsValid)
Pages\Account\Manage\ChangePassword.cshtml.cs (1)
77if (!ModelState.IsValid)
Pages\Account\Manage\EnableAuthenticator.cshtml.cs (1)
81if (!ModelState.IsValid)
Pages\Account\Manage\Index.cshtml.cs (2)
78if (!ModelState.IsValid) 112if (!ModelState.IsValid)
Pages\Account\Manage\SetPassword.cshtml.cs (1)
69if (!ModelState.IsValid)
Pages\Account\Register.cshtml.cs (1)
69if (ModelState.IsValid)
Pages\Account\ResetPassword.cshtml.cs (1)
65if (!ModelState.IsValid)
IdentitySample.DefaultUI (2)
Areas\Identity\Pages\Account\Manage\Index.cshtml.cs (1)
71if (!ModelState.IsValid)
Areas\Identity\Pages\Account\Register.cshtml.cs (1)
80if (ModelState.IsValid)
IdentitySample.Mvc (13)
Controllers\AccountController.cs (9)
56if (ModelState.IsValid) 104if (ModelState.IsValid) 203if (ModelState.IsValid) 268if (ModelState.IsValid) 315if (!ModelState.IsValid) 366if (!ModelState.IsValid) 424if (!ModelState.IsValid) 471if (!ModelState.IsValid) 518if (!ModelState.IsValid)
Controllers\ManageController.cs (4)
96if (!ModelState.IsValid) 186if (!ModelState.IsValid) 238if (!ModelState.IsValid) 272if (!ModelState.IsValid)
Microsoft.AspNetCore.Identity.UI (28)
Areas\Identity\Pages\V4\Account\ExternalLogin.cshtml.cs (1)
181if (ModelState.IsValid)
Areas\Identity\Pages\V4\Account\ForgotPassword.cshtml.cs (1)
64if (ModelState.IsValid)
Areas\Identity\Pages\V4\Account\Login.cshtml.cs (1)
126if (ModelState.IsValid)
Areas\Identity\Pages\V4\Account\LoginWith2fa.cshtml.cs (1)
111if (!ModelState.IsValid)
Areas\Identity\Pages\V4\Account\LoginWithRecoveryCode.cshtml.cs (1)
96if (!ModelState.IsValid)
Areas\Identity\Pages\V4\Account\Manage\ChangePassword.cshtml.cs (1)
115if (!ModelState.IsValid)
Areas\Identity\Pages\V4\Account\Manage\Email.cshtml.cs (2)
130if (!ModelState.IsValid) 165if (!ModelState.IsValid)
Areas\Identity\Pages\V4\Account\Manage\EnableAuthenticator.cshtml.cs (1)
124if (!ModelState.IsValid)
Areas\Identity\Pages\V4\Account\Manage\Index.cshtml.cs (1)
111if (!ModelState.IsValid)
Areas\Identity\Pages\V4\Account\Manage\SetPassword.cshtml.cs (1)
103if (!ModelState.IsValid)
Areas\Identity\Pages\V4\Account\Register.cshtml.cs (1)
127if (ModelState.IsValid)
Areas\Identity\Pages\V4\Account\ResendEmailConfirmation.cshtml.cs (1)
74if (!ModelState.IsValid)
Areas\Identity\Pages\V4\Account\ResetPassword.cshtml.cs (1)
108if (!ModelState.IsValid)
Areas\Identity\Pages\V5\Account\ExternalLogin.cshtml.cs (1)
181if (ModelState.IsValid)
Areas\Identity\Pages\V5\Account\ForgotPassword.cshtml.cs (1)
64if (ModelState.IsValid)
Areas\Identity\Pages\V5\Account\Login.cshtml.cs (1)
126if (ModelState.IsValid)
Areas\Identity\Pages\V5\Account\LoginWith2fa.cshtml.cs (1)
111if (!ModelState.IsValid)
Areas\Identity\Pages\V5\Account\LoginWithRecoveryCode.cshtml.cs (1)
96if (!ModelState.IsValid)
Areas\Identity\Pages\V5\Account\Manage\ChangePassword.cshtml.cs (1)
115if (!ModelState.IsValid)
Areas\Identity\Pages\V5\Account\Manage\Email.cshtml.cs (2)
130if (!ModelState.IsValid) 165if (!ModelState.IsValid)
Areas\Identity\Pages\V5\Account\Manage\EnableAuthenticator.cshtml.cs (1)
124if (!ModelState.IsValid)
Areas\Identity\Pages\V5\Account\Manage\Index.cshtml.cs (1)
111if (!ModelState.IsValid)
Areas\Identity\Pages\V5\Account\Manage\SetPassword.cshtml.cs (1)
103if (!ModelState.IsValid)
Areas\Identity\Pages\V5\Account\Register.cshtml.cs (1)
127if (ModelState.IsValid)
Areas\Identity\Pages\V5\Account\ResendEmailConfirmation.cshtml.cs (1)
74if (!ModelState.IsValid)
Areas\Identity\Pages\V5\Account\ResetPassword.cshtml.cs (1)
108if (!ModelState.IsValid)
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\ModelValidationState.cs (1)
10/// of <see cref="ModelStateDictionary"/>. <see cref="ModelStateDictionary.IsValid"/> is <see langword="true" />, when
Microsoft.AspNetCore.Mvc.Abstractions.Test (4)
ModelBinding\ModelStateDictionaryTest.cs (4)
459var isValid = dictionary.IsValid; 476var isValid = dictionary.IsValid; 540var isValid = dictionary.IsValid; 1632var isValid = dictionary.IsValid;
Microsoft.AspNetCore.Mvc.Core (5)
ControllerBase.cs (1)
2840return ModelState.IsValid;
Infrastructure\ModelStateInvalidFilter.cs (1)
76if (context.Result == null && !context.ModelState.IsValid)
ModelBinding\ModelBindingHelper.cs (1)
279return modelState.IsValid;
ModelBinding\UnsupportedContentTypeFilter.cs (1)
38if (modelState.IsValid)
SerializableError.cs (1)
33if (modelState.IsValid)
Microsoft.AspNetCore.Mvc.Core.Test (98)
ControllerBaseTest.cs (2)
3081Assert.True(controller.ModelState.IsValid); 3171Assert.True(controller.ModelState.IsValid);
Controllers\ControllerBinderDelegateProviderTest.cs (4)
416Assert.False(controllerContext.ModelState.IsValid); 512Assert.False(controllerContext.ModelState.IsValid); 562Assert.True(controllerContext.ModelState.IsValid); 1190Assert.True(modelState.IsValid);
Formatters\SystemTextJsonInputFormatterTest.cs (4)
103Assert.False(formatterContext.ModelState.IsValid); 124Assert.False(formatterContext.ModelState.IsValid); 154Assert.True(!formatterContext.ModelState.IsValid); 176Assert.True(!formatterContext.ModelState.IsValid);
ModelBinding\Binders\BodyModelBinderTests.cs (3)
150Assert.False(bindingContext.ModelState.IsValid); 216Assert.True(bindingContext.ModelState.IsValid); 242Assert.False(bindingContext.ModelState.IsValid);
ModelBinding\Binders\ByteArrayModelBinderTests.cs (1)
76Assert.False(bindingContext.ModelState.IsValid);
ModelBinding\Binders\CollectionModelBinderTest.cs (2)
89Assert.True(modelState.IsValid); 120Assert.True(modelState.IsValid);
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (14)
616Assert.False(modelStateDictionary.IsValid); 681Assert.False(modelStateDictionary.IsValid); 720Assert.False(modelStateDictionary.IsValid); 752Assert.True(modelStateDictionary.IsValid); 775Assert.True(modelStateDictionary.IsValid); 799Assert.True(bindingContext.ModelState.IsValid); 824Assert.True(bindingContext.ModelState.IsValid); 858Assert.True(bindingContext.ModelState.IsValid); 880Assert.True(bindingContext.ModelState.IsValid); 904Assert.True(bindingContext.ModelState.IsValid); 928Assert.True(bindingContext.ModelState.IsValid); 991Assert.True(modelState.IsValid); 1033Assert.True(bindingContext.ModelState.IsValid); 1078Assert.False(bindingContext.ModelState.IsValid);
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (14)
794Assert.False(modelStateDictionary.IsValid); 828Assert.False(modelStateDictionary.IsValid); 864Assert.False(modelStateDictionary.IsValid); 893Assert.True(modelStateDictionary.IsValid); 913Assert.True(modelStateDictionary.IsValid); 934Assert.True(bindingContext.ModelState.IsValid); 956Assert.True(bindingContext.ModelState.IsValid); 994Assert.True(bindingContext.ModelState.IsValid); 1042Assert.True(bindingContext.ModelState.IsValid); 1066Assert.True(bindingContext.ModelState.IsValid); 1090Assert.True(bindingContext.ModelState.IsValid); 1153Assert.True(modelState.IsValid); 1195Assert.True(bindingContext.ModelState.IsValid); 1240Assert.False(bindingContext.ModelState.IsValid);
ModelBinding\Binders\DateTimeModelBinderTest.cs (1)
47Assert.False(bindingContext.ModelState.IsValid);
ModelBinding\Binders\EnumTypeModelBinderTest.cs (3)
42Assert.False(bindingContext.ModelState.IsValid); 147Assert.False(bindingContext.ModelState.IsValid); 230Assert.False(bindingContext.ModelState.IsValid);
ModelBinding\Binders\FloatingPointTypeModelBinderTestOfT.cs (1)
69Assert.False(bindingContext.ModelState.IsValid);
ModelBinding\Binders\KeyValuePairModelBinderTest.cs (3)
30Assert.False(bindingContext.ModelState.IsValid); 54Assert.False(bindingContext.ModelState.IsValid); 80Assert.True(bindingContext.ModelState.IsValid);
ModelBinding\Binders\SimpleTypeModelBinderTest.cs (1)
153Assert.False(bindingContext.ModelState.IsValid);
ModelBinding\Binders\TryParseTypeModelBinderTest.cs (1)
102Assert.False(bindingContext.ModelState.IsValid);
ModelBinding\CompositeValueProviderTest.cs (1)
60Assert.False(modelState.IsValid);
ModelBinding\ParameterBinderTest.cs (12)
78Assert.False(actionContext.ModelState.IsValid); 116Assert.False(actionContext.ModelState.IsValid); 216Assert.False(actionContext.ModelState.IsValid); 254Assert.False(actionContext.ModelState.IsValid); 295Assert.False(actionContext.ModelState.IsValid); 347Assert.False(actionContext.ModelState.IsValid); 402Assert.False(actionContext.ModelState.IsValid); 457Assert.False(actionContext.ModelState.IsValid); 511Assert.False(actionContext.ModelState.IsValid); 569Assert.False(modelState.IsValid); 630Assert.False(modelState.IsValid); 698Assert.False(modelState.IsValid);
ModelBinding\Validation\DefaultObjectValidatorTests.cs (31)
66Assert.True(modelState.IsValid); 95Assert.False(modelState.IsValid); 122Assert.True(modelState.IsValid); 148Assert.True(modelState.IsValid); 172Assert.True(modelState.IsValid); 204Assert.True(modelState.IsValid); 234Assert.False(modelState.IsValid); 277Assert.True(modelState.IsValid); 309Assert.False(modelState.IsValid); 341Assert.False(modelState.IsValid); 373Assert.False(modelState.IsValid); 486Assert.False(modelState.IsValid); 533Assert.False(modelState.IsValid); 632Assert.True(modelState.IsValid); 663Assert.False(modelState.IsValid); 699Assert.False(modelState.IsValid); 739Assert.False(modelState.IsValid); 769Assert.True(modelState.IsValid); 800Assert.False(modelState.IsValid); 843Assert.False(modelState.IsValid); 925Assert.True(modelState.IsValid); 1001Assert.True(modelState.IsValid); 1042Assert.False(modelState.IsValid); 1213Assert.True(modelState.IsValid); 1241Assert.False(modelState.IsValid); 1300Assert.True(actionContext.ModelState.IsValid); 1329Assert.False(actionContext.ModelState.IsValid); 1355Assert.False(modelState.IsValid); 1379Assert.True(modelState.IsValid); 1409Assert.True(modelState.IsValid); 1439Assert.False(modelState.IsValid);
Microsoft.AspNetCore.Mvc.IntegrationTests (470)
ActionParametersIntegrationTest.cs (16)
65Assert.True(modelState.IsValid); 111Assert.True(modelState.IsValid); 159Assert.True(modelState.IsValid); 206Assert.True(modelState.IsValid); 245Assert.True(modelState.IsValid); 291Assert.True(modelState.IsValid); 336Assert.True(modelState.IsValid); 382Assert.True(modelState.IsValid); 440Assert.True(modelState.IsValid); 628Assert.True(modelState.IsValid); 661Assert.True(modelState.IsValid); 701Assert.False(modelState.IsValid); 739Assert.Equal(isValid, modelState.IsValid); 792Assert.Equal(isValid, modelState.IsValid); 834Assert.False(modelState.IsValid, "model is valid"); 879Assert.False(modelState.IsValid, "model is valid");
ArrayModelBinderIntegrationTest.cs (9)
42Assert.True(modelState.IsValid); 86Assert.True(modelState.IsValid); 126Assert.True(modelState.IsValid); 164Assert.True(modelState.IsValid); 202Assert.True(modelState.IsValid); 247Assert.True(modelState.IsValid); 288Assert.True(modelState.IsValid); 326Assert.True(modelState.IsValid); 360Assert.True(modelState.IsValid);
BinderTypeBasedModelBinderIntegrationTest.cs (7)
44Assert.True(modelState.IsValid); 75Assert.True(modelState.IsValid); 115Assert.True(modelState.IsValid); 180Assert.True(modelState.IsValid); 232Assert.True(modelState.IsValid); 270Assert.True(modelState.IsValid); 309Assert.True(modelState.IsValid);
BindingSourceMetadataProviderIntegrationTest.cs (2)
59Assert.True(modelState.IsValid); 111Assert.True(modelState.IsValid);
BindPropertyIntegrationTest.cs (4)
133Assert.True(testContext.ModelState.IsValid); 173Assert.Equal(isValid, testContext.ModelState.IsValid); 241Assert.Equal(isValid, pageContext.ModelState.IsValid); 292Assert.Equal(isValid, testContext.ModelState.IsValid);
BodyValidationIntegrationTests.cs (19)
48Assert.True(modelState.IsValid); 86Assert.True(modelState.IsValid); 130Assert.False(modelState.IsValid); 176Assert.False(modelState.IsValid); 215Assert.False(modelState.IsValid); 255Assert.True(modelState.IsValid); 294Assert.False(modelState.IsValid); 336Assert.False(modelState.IsValid); 390Assert.False(modelState.IsValid); 429Assert.True(modelState.IsValid); 476Assert.False(modelState.IsValid); 543Assert.True(modelState.IsValid); 583Assert.False(modelState.IsValid); 636Assert.False(modelState.IsValid); 680Assert.True(modelState.IsValid); 733Assert.False(modelState.IsValid); 788Assert.True(modelState.IsValid); 844Assert.True(modelState.IsValid); 889Assert.True(modelState.IsValid);
ByteArrayModelBinderIntegrationTest.cs (3)
59Assert.True(modelState.IsValid); 98Assert.True(modelState.IsValid); 141Assert.True(modelState.IsValid);
CancellationTokenModelBinderIntegrationTest.cs (3)
51Assert.True(modelState.IsValid); 87Assert.True(modelState.IsValid); 125Assert.True(modelState.IsValid);
CollectionModelBinderIntegrationTest.cs (20)
48Assert.True(modelState.IsValid); 96Assert.True(modelState.IsValid); 132Assert.True(modelState.IsValid); 162Assert.True(modelState.IsValid); 205Assert.True(modelState.IsValid); 245Assert.True(modelState.IsValid); 275Assert.True(modelState.IsValid); 318Assert.False(modelState.IsValid); 377Assert.False(modelState.IsValid); 428Assert.False(modelState.IsValid); 478Assert.True(modelState.IsValid); 523Assert.False(modelState.IsValid); 569Assert.True(modelState.IsValid); 619Assert.True(modelState.IsValid); 674Assert.False(modelState.IsValid); 716Assert.False(modelState.IsValid); 962Assert.True(modelState.IsValid); 1028Assert.True(modelState.IsValid); 1151Assert.True(modelState.IsValid); 1200Assert.True(modelState.IsValid);
ComplexRecordIntegrationTest.cs (75)
74Assert.True(modelState.IsValid); 124Assert.True(modelState.IsValid); 175Assert.True(modelState.IsValid); 229Assert.True(modelState.IsValid); 278Assert.True(modelState.IsValid); 326Assert.True(modelState.IsValid); 375Assert.True(modelState.IsValid); 427Assert.True(modelState.IsValid); 479Assert.True(modelState.IsValid); 532Assert.True(modelState.IsValid); 585Assert.True(modelState.IsValid); 638Assert.True(modelState.IsValid); 696Assert.True(modelState.IsValid); 750Assert.True(modelState.IsValid); 799Assert.True(modelState.IsValid); 854Assert.True(modelState.IsValid); 909Assert.True(modelState.IsValid); 956Assert.True(modelState.IsValid); 1002Assert.True(modelState.IsValid); 1057Assert.True(modelState.IsValid); 1112Assert.True(modelState.IsValid); 1159Assert.True(modelState.IsValid); 1205Assert.True(modelState.IsValid); 1260Assert.True(modelState.IsValid); 1315Assert.True(modelState.IsValid); 1362Assert.True(modelState.IsValid); 1451Assert.True(modelState.IsValid); 1558Assert.True(modelState.IsValid); 1665Assert.True(modelState.IsValid); 1739Assert.True(modelState.IsValid); 1794Assert.True(modelState.IsValid); 1870Assert.True(modelState.IsValid); 1946Assert.True(modelState.IsValid); 1989Assert.False(modelState.IsValid); 2045Assert.False(modelState.IsValid); 2099Assert.False(modelState.IsValid); 2153Assert.False(modelState.IsValid); 2211Assert.False(modelState.IsValid); 2265Assert.False(modelState.IsValid); 2317Assert.False(modelState.IsValid); 2365Assert.True(modelState.IsValid); 2413Assert.False(modelState.IsValid); 2465Assert.False(modelState.IsValid); 2512Assert.True(modelState.IsValid); 2563Assert.False(modelState.IsValid); 2624Assert.False(modelState.IsValid); 2673Assert.True(modelState.IsValid); 2721Assert.True(modelState.IsValid); 2781Assert.True(modelState.IsValid); 2834Assert.True(modelState.IsValid); 2944Assert.True(modelState.IsValid); 3011Assert.True(modelState.IsValid); 3081Assert.True(modelState.IsValid); 3147Assert.True(modelState.IsValid); 3206Assert.True(modelState.IsValid); 3295Assert.True(modelState.IsValid); 3356Assert.True(modelState.IsValid); 3478Assert.True(modelState.IsValid); 3521Assert.True(modelState.IsValid); 3564Assert.True(modelState.IsValid); 3607Assert.True(modelState.IsValid); 3611Assert.True(modelState.IsValid); 3658Assert.True(modelState.IsValid); 3704Assert.True(modelState.IsValid); 3748Assert.True(modelState.IsValid); 3799Assert.True(modelState.IsValid); 3836Assert.True(modelState.IsValid); 3886Assert.True(modelState.IsValid); 3923Assert.True(modelState.IsValid); 3968Assert.True(modelState.IsValid); 4012Assert.True(modelState.IsValid); 4053Assert.True(modelState.IsValid); 4096Assert.True(modelState.IsValid); 4141Assert.True(modelState.IsValid); 4191Assert.False(modelState.IsValid);
ComplexTypeIntegrationTestBase.cs (58)
111Assert.True(modelState.IsValid); 161Assert.True(modelState.IsValid); 212Assert.True(modelState.IsValid); 261Assert.True(modelState.IsValid); 309Assert.True(modelState.IsValid); 368Assert.True(modelState.IsValid); 420Assert.True(modelState.IsValid); 472Assert.True(modelState.IsValid); 535Assert.True(modelState.IsValid); 588Assert.True(modelState.IsValid); 641Assert.True(modelState.IsValid); 699Assert.True(modelState.IsValid); 753Assert.True(modelState.IsValid); 807Assert.True(modelState.IsValid); 862Assert.True(modelState.IsValid); 917Assert.True(modelState.IsValid); 964Assert.True(modelState.IsValid); 1015Assert.True(modelState.IsValid); 1070Assert.True(modelState.IsValid); 1125Assert.True(modelState.IsValid); 1172Assert.True(modelState.IsValid); 1223Assert.True(modelState.IsValid); 1278Assert.True(modelState.IsValid); 1333Assert.True(modelState.IsValid); 1380Assert.True(modelState.IsValid); 1487Assert.True(modelState.IsValid); 1594Assert.True(modelState.IsValid); 1701Assert.True(modelState.IsValid); 1780Assert.True(modelState.IsValid); 1835Assert.True(modelState.IsValid); 1889Assert.False(modelState.IsValid); 1938Assert.False(modelState.IsValid); 2010Assert.True(modelState.IsValid); 2093Assert.True(modelState.IsValid); 2143Assert.False(modelState.IsValid); 2198Assert.False(modelState.IsValid); 2261Assert.False(modelState.IsValid); 2315Assert.False(modelState.IsValid); 2373Assert.False(modelState.IsValid); 2431Assert.False(modelState.IsValid); 2483Assert.False(modelState.IsValid); 2531Assert.True(modelState.IsValid); 2583Assert.False(modelState.IsValid); 2635Assert.False(modelState.IsValid); 2682Assert.True(modelState.IsValid); 2736Assert.False(modelState.IsValid); 2797Assert.False(modelState.IsValid); 2852Assert.True(modelState.IsValid); 2900Assert.True(modelState.IsValid); 2972Assert.True(modelState.IsValid); 3025Assert.True(modelState.IsValid); 3148Assert.True(modelState.IsValid); 3219Assert.True(modelState.IsValid); 3296Assert.True(modelState.IsValid); 3369Assert.True(modelState.IsValid); 3428Assert.True(modelState.IsValid); 3524Assert.True(modelState.IsValid); 3601Assert.True(modelState.IsValid);
DictionaryModelBinderIntegrationTest.cs (30)
46Assert.True(modelState.IsValid); 85Assert.True(modelState.IsValid); 125Assert.True(modelState.IsValid); 177Assert.True(modelState.IsValid); 214Assert.True(modelState.IsValid); 357Assert.True(modelState.IsValid); 394Assert.True(modelState.IsValid); 426Assert.True(modelState.IsValid); 460Assert.True(modelState.IsValid); 531Assert.True(modelState.IsValid); 569Assert.True(modelState.IsValid); 607Assert.True(modelState.IsValid); 642Assert.True(modelState.IsValid); 677Assert.True(modelState.IsValid); 729Assert.True(modelState.IsValid); 768Assert.True(modelState.IsValid); 807Assert.False(modelState.IsValid); 848Assert.True(modelState.IsValid); 882Assert.True(modelState.IsValid); 932Assert.True(modelState.IsValid); 966Assert.True(modelState.IsValid); 1000Assert.True(modelState.IsValid); 1039Assert.True(modelState.IsValid); 1078Assert.True(modelState.IsValid); 1191Assert.True(modelState.IsValid); 1272Assert.True(modelState.IsValid); 1352Assert.False(modelState.IsValid); 1386Assert.False(modelState.IsValid); 1424Assert.False(modelState.IsValid); 1505Assert.False(modelState.IsValid);
FormCollectionModelBindingIntegrationTest.cs (3)
66Assert.True(modelState.IsValid); 114Assert.True(modelState.IsValid); 147Assert.True(modelState.IsValid);
FormFileModelBindingIntegrationTest.cs (18)
65Assert.True(modelState.IsValid); 112Assert.True(modelState.IsValid); 163Assert.True(modelState.IsValid); 226Assert.True(modelState.IsValid); 316Assert.True(modelState.IsValid); 382Assert.True(modelState.IsValid); 444Assert.True(modelState.IsValid); 506Assert.True(modelState.IsValid); 545Assert.True(modelState.IsValid); 595Assert.True(modelState.IsValid); 646Assert.True(modelState.IsValid); 684Assert.True(modelState.IsValid); 734Assert.True(modelState.IsValid); 809Assert.True(modelState.IsValid); 874Assert.True(modelState.IsValid); 916Assert.True(modelState.IsValid); 976Assert.True(modelState.IsValid); 1021Assert.True(modelState.IsValid);
GenericModelBinderIntegrationTest.cs (13)
50Assert.True(modelState.IsValid); 88Assert.True(modelState.IsValid); 219Assert.True(modelState.IsValid); 253Assert.True(modelState.IsValid); 290Assert.True(modelState.IsValid); 335Assert.True(modelState.IsValid); 378Assert.True(modelState.IsValid); 414Assert.True(modelState.IsValid); 458Assert.True(modelState.IsValid); 501Assert.True(modelState.IsValid); 538Assert.True(modelState.IsValid); 586Assert.True(modelState.IsValid); 633Assert.True(modelState.IsValid);
HeaderModelBinderIntegrationTest.cs (7)
59Assert.False(modelState.IsValid); 100Assert.True(modelState.IsValid); 142Assert.True(modelState.IsValid); 187Assert.True(modelState.IsValid); 234Assert.True(modelState.IsValid); 296Assert.True(modelState.IsValid); 358Assert.True(modelState.IsValid);
JQueryFormatModelBindingIntegrationTest.cs (2)
51Assert.True(modelState.IsValid); 89Assert.True(modelState.IsValid);
KeyValuePairModelBinderIntegrationTest.cs (13)
42Assert.True(modelState.IsValid); 76Assert.False(modelState.IsValid); 126Assert.False(modelState.IsValid); 163Assert.False(modelState.IsValid); 213Assert.False(modelState.IsValid); 260Assert.True(modelState.IsValid); 300Assert.True(modelState.IsValid); 338Assert.False(modelState.IsValid); 379Assert.True(modelState.IsValid); 424Assert.True(modelState.IsValid); 465Assert.True(modelState.IsValid); 503Assert.False(modelState.IsValid); 541Assert.True(modelState.IsValid);
ModelPrefixSelectionIntegrationTest.cs (5)
57Assert.True(modelState.IsValid); 106Assert.True(modelState.IsValid); 145Assert.True(modelState.IsValid); 194Assert.True(modelState.IsValid); 240Assert.True(modelState.IsValid);
NullableReferenceTypeIntegrationTest.cs (4)
48Assert.False(modelState.IsValid); 96Assert.True(modelState.IsValid); 135Assert.False(modelState.IsValid); 190Assert.False(modelState.IsValid);
ServicesModelBinderIntegrationTest.cs (10)
47Assert.True(modelState.IsValid); 83Assert.True(modelState.IsValid); 119Assert.True(modelState.IsValid); 155Assert.True(modelState.IsValid); 224Assert.True(modelState.IsValid); 260Assert.True(modelState.IsValid); 293Assert.True(modelState.IsValid); 329Assert.True(modelState.IsValid); 372Assert.True(modelState.IsValid); 409Assert.True(modelState.IsValid);
SimpleTypeModelBinderIntegrationTest.cs (17)
56Assert.True(modelState.IsValid); 100Assert.True(modelState.IsValid); 143Assert.True(modelState.IsValid); 183Assert.True(modelState.IsValid); 220Assert.True(modelState.IsValid); 264Assert.True(modelState.IsValid); 313Assert.True(modelState.IsValid); 349Assert.True(modelState.IsValid); 392Assert.False(modelState.IsValid); 452Assert.False(modelState.IsValid); 501Assert.False(modelState.IsValid); 555Assert.False(modelState.IsValid); 598Assert.True(modelState.IsValid); 633Assert.True(modelState.IsValid); 694Assert.True(modelState.IsValid); 738Assert.True(modelState.IsValid); 782Assert.True(modelState.IsValid);
TryUpdateModelIntegrationTest.cs (28)
49Assert.True(modelState.IsValid); 83Assert.True(modelState.IsValid); 153Assert.True(modelState.IsValid); 193Assert.True(modelState.IsValid); 234Assert.True(modelState.IsValid); 275Assert.True(modelState.IsValid); 336Assert.True(modelState.IsValid); 371Assert.True(modelState.IsValid); 400Assert.True(modelState.IsValid); 440Assert.True(modelState.IsValid); 488Assert.True(modelState.IsValid); 529Assert.True(modelState.IsValid); 577Assert.True(modelState.IsValid); 624Assert.True(modelState.IsValid); 656Assert.True(modelState.IsValid); 690Assert.True(modelState.IsValid); 753Assert.True(modelState.IsValid); 793Assert.True(modelState.IsValid); 829Assert.True(modelState.IsValid); 870Assert.True(modelState.IsValid); 921Assert.True(modelState.IsValid); 957Assert.True(modelState.IsValid); 1005Assert.True(modelState.IsValid); 1041Assert.True(modelState.IsValid); 1075Assert.True(modelState.IsValid); 1126Assert.True(modelState.IsValid); 1197Assert.True(modelState.IsValid); 1249Assert.True(modelState.IsValid);
TryValidateModelIntegrationTest.cs (5)
39Assert.False(modelState.IsValid); 70Assert.True(modelState.IsValid); 119Assert.False(modelState.IsValid); 146Assert.False(modelState.IsValid); 167Assert.False(modelState.IsValid);
ValidationIntegrationTests.cs (51)
112Assert.False(modelState.IsValid); 154Assert.True(modelState.IsValid); 192Assert.True(modelState.IsValid); 229Assert.False(modelState.IsValid); 281Assert.True(modelState.IsValid); 318Assert.False(modelState.IsValid); 372Assert.True(modelState.IsValid); 412Assert.False(modelState.IsValid); 464Assert.True(modelState.IsValid); 502Assert.False(modelState.IsValid); 550Assert.True(modelState.IsValid); 590Assert.False(modelState.IsValid); 642Assert.True(modelState.IsValid); 666Assert.False(modelState.IsValid); 708Assert.True(modelState.IsValid); 745Assert.False(modelState.IsValid); 796Assert.True(modelState.IsValid); 833Assert.False(modelState.IsValid); 873Assert.True(modelState.IsValid); 931Assert.True(modelState.IsValid); 968Assert.False(modelState.IsValid); 1038Assert.True(modelState.IsValid); 1075Assert.False(modelState.IsValid); 1126Assert.True(modelState.IsValid); 1163Assert.False(modelState.IsValid); 1203Assert.True(modelState.IsValid); 1241Assert.False(modelState.IsValid); 1281Assert.False(modelState.IsValid); 1371Assert.False(modelState.IsValid); 1420Assert.False(modelState.IsValid); 1459Assert.True(modelState.IsValid); 1491Assert.True(modelState.IsValid); 1521Assert.True(modelState.IsValid); 1598Assert.True(modelState.IsValid); 1636Assert.True(modelState.IsValid); 1688Assert.True(modelState.IsValid); 1753Assert.True(modelState.IsValid); 1812Assert.True(modelState.IsValid); 1854Assert.False(modelState.IsValid); 1900Assert.False(modelState.IsValid); 1947Assert.False(modelState.IsValid); 2052Assert.True(modelState.IsValid); 2104Assert.False(modelState.IsValid); 2175Assert.False(modelState.IsValid); 2240Assert.True(modelState.IsValid); 2287Assert.False(modelState.IsValid); 2340Assert.True(modelState.IsValid); 2394Assert.False(modelState.IsValid); 2444Assert.True(modelState.IsValid); 2496Assert.True(modelState.IsValid); 2546Assert.True(modelState.IsValid);
ValidationWithRecordIntegrationTests.cs (48)
104Assert.False(modelState.IsValid); 146Assert.True(modelState.IsValid); 180Assert.True(modelState.IsValid); 217Assert.False(modelState.IsValid); 262Assert.True(modelState.IsValid); 299Assert.False(modelState.IsValid); 344Assert.True(modelState.IsValid); 384Assert.False(modelState.IsValid); 429Assert.True(modelState.IsValid); 467Assert.False(modelState.IsValid); 509Assert.True(modelState.IsValid); 549Assert.False(modelState.IsValid); 591Assert.True(modelState.IsValid); 628Assert.False(modelState.IsValid); 672Assert.True(modelState.IsValid); 709Assert.False(modelState.IsValid); 749Assert.True(modelState.IsValid); 800Assert.True(modelState.IsValid); 837Assert.False(modelState.IsValid); 900Assert.True(modelState.IsValid); 937Assert.False(modelState.IsValid); 984Assert.True(modelState.IsValid); 1021Assert.False(modelState.IsValid); 1061Assert.True(modelState.IsValid); 1093Assert.False(modelState.IsValid); 1133Assert.False(modelState.IsValid); 1215Assert.False(modelState.IsValid); 1264Assert.False(modelState.IsValid); 1303Assert.True(modelState.IsValid); 1335Assert.True(modelState.IsValid); 1406Assert.True(modelState.IsValid); 1444Assert.True(modelState.IsValid); 1494Assert.True(modelState.IsValid); 1556Assert.True(modelState.IsValid); 1615Assert.True(modelState.IsValid); 1657Assert.False(modelState.IsValid); 1703Assert.False(modelState.IsValid); 1750Assert.False(modelState.IsValid); 1843Assert.True(modelState.IsValid); 1895Assert.False(modelState.IsValid); 1966Assert.False(modelState.IsValid); 2031Assert.True(modelState.IsValid); 2078Assert.False(modelState.IsValid); 2131Assert.True(modelState.IsValid); 2182Assert.False(modelState.IsValid); 2232Assert.True(modelState.IsValid); 2282Assert.True(modelState.IsValid); 2445Assert.False(modelState.IsValid);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (7)
NewtonsoftJsonInputFormatterTest.cs (7)
170Assert.False(formatterContext.ModelState.IsValid); 247Assert.True(!formatterContext.ModelState.IsValid); 302Assert.True(!formatterContext.ModelState.IsValid); 335Assert.True(!formatterContext.ModelState.IsValid); 367Assert.False(formatterContext.ModelState.IsValid); 398Assert.False(formatterContext.ModelState.IsValid); 429Assert.False(formatterContext.ModelState.IsValid);
Microsoft.AspNetCore.Mvc.RazorPages (2)
PageBase.cs (1)
1581return ModelState.IsValid;
PageModel.cs (1)
1658return ModelState.IsValid;
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Infrastructure\PageBinderFactoryTest.cs (2)
566Assert.False(modelState.IsValid); 696Assert.False(modelState.IsValid);
Microsoft.AspNetCore.Mvc.ViewFeatures (2)
DefaultHtmlGenerator.cs (2)
811if (!viewContext.ClientValidationEnabled && viewData.ModelState.IsValid) 874if (viewData.ModelState.IsValid)
Mvc.Api.Analyzers.Test (13)
TestFiles\ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzerIntegrationTest\DiagnosticsAreReturned_ForApiActionsWithModelStateChecks.cs (1)
17/*MM*/if (!ModelState.IsValid)
TestFiles\ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzerIntegrationTest\DiagnosticsAreReturned_ForApiActionsWithModelStateChecksUsingEquality.cs (1)
17/*MM*/if (ModelState.IsValid == false)
TestFiles\ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzerIntegrationTest\DiagnosticsAreReturned_ForApiActionsWithModelStateChecksWithoutBracing.cs (1)
15/*MM*/if (!ModelState.IsValid)
TestFiles\ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForApiActionsCheckingAdditionalConditions.cs (1)
12if (!ModelState.IsValid && !Request.Query.ContainsKey("skip-validation"))
TestFiles\ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForApiActionsReturningNot400FromNonModelStateIsValidBlock.cs (1)
12if (!ModelState.IsValid)
TestFiles\ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForNonApiController.cs (1)
10if (!ModelState.IsValid)
TestFiles\ApiActionsDoNotRequireExplicitModelValidationCheckAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForRazorPageModels.cs (1)
12if (!ModelState.IsValid)
TestFiles\ApiActionsDoNotRequireExplicitModelValidationCheckCodeFixProviderTest\CodeFixRemovesIfBlockWithoutBraces.Input.cs (1)
15if (!ModelState.IsValid)
TestFiles\ApiActionsDoNotRequireExplicitModelValidationCheckCodeFixProviderTest\CodeFixRemovesModelStateIsInvalidBlockWithEqualityCheck.Input.cs (1)
17if (ModelState.IsValid == false)
TestFiles\ApiActionsDoNotRequireExplicitModelValidationCheckCodeFixProviderTest\CodeFixRemovesModelStateIsInvalidBlockWithIfNotCheck.Input.cs (1)
17if (!ModelState.IsValid)
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_ForActionResultOfTReturningMethodWithoutSomeAttributes.cs (1)
20if (!ModelState.IsValid)
TestFiles\ApiConventionAnalyzerIntegrationTest\DiagnosticsAreReturned_IfMethodWithConvention_DoesNotReturnDocumentedStatusCode.cs (1)
15if (!ModelState.IsValid)
TestFiles\ApiConventionAnalyzerIntegrationTest\NoDiagnosticsAreReturned_ForApiController_WithAllDocumentedStatusCodes.cs (1)
23if (!ModelState.IsValid)
RazorPagesWebSite (2)
Pages\CustomModelTypeModel.cshtml.cs (1)
76if (!ModelState.IsValid)
Pages\PropertyBinding\PolymorphicBinding.cs (1)
16if (!ModelState.IsValid)
TagHelpersWebSite (1)
Controllers\EmployeeController.cs (1)
27if (ModelState.IsValid)
XmlFormattersWebSite (2)
Controllers\HomeController.cs (1)
15if (!ModelState.IsValid)
Controllers\SerializableErrorController.cs (1)
40if (!ModelState.IsValid)