From b64fd7ae39e27637ece40257dfdc5a3873299506 Mon Sep 17 00:00:00 2001 From: Ryan Nowak Date: Thu, 21 May 2015 00:08:07 -0700 Subject: [PATCH] Fix #2407 - Add back the implicit [Required] for value types This change adds a [Required] client validator when ModelMetadata.IsRequired == true. The bulk of the changes here are mechanical updates to test files. --- ...AnnotationsClientModelValidatorProvider.cs | 10 ++ ...tationsClientModelValidatorProviderTest.cs | 61 ++++++++-- ...DefaultModelClientValidatorProviderTest.cs | 10 +- .../DefaultModelValidatorProviderTest.cs | 60 ++-------- .../Rendering/DefaultEditorTemplatesTest.cs | 26 +++- .../Rendering/HtmlHelperCheckboxTest.cs | 111 ++++++++++++------ .../HtmlHelperOptionsTest.cs | 2 +- .../PrecompilationTest.cs | 6 +- ...elBindingWebSite.Vehicle.Edit.Invalid.html | 4 +- .../ModelBindingWebSite.Vehicle.Edit.html | 4 +- ...rsWebSite.MvcTagHelper_Customer.Index.html | 4 +- ...ite.MvcTagHelper_Home.CreateWarehouse.html | 2 +- ...ersWebSite.MvcTagHelper_Home.Customer.html | 4 +- ...cTagHelper_Home.EditWarehouse.Encoded.html | 4 +- ...bSite.MvcTagHelper_Home.EditWarehouse.html | 4 +- ...ebSite.MvcTagHelper_Home.EmployeeList.html | 18 +-- ...bSite.MvcTagHelper_Home.Order.Encoded.html | 10 +- ...elpersWebSite.MvcTagHelper_Home.Order.html | 10 +- ...er_Home.OrderUsingHtmlHelpers.Encoded.html | 10 +- ...cTagHelper_Home.OrderUsingHtmlHelpers.html | 10 +- ...WebSite.MvcTagHelper_Home.ProductList.html | 6 +- ...elpersWebSite.Employee.Create.Invalid.html | 4 +- .../TagHelpersWebSite.Employee.Create.html | 4 +- ...Vehicle_PopulatesPropertyErrorsInViews.txt | 4 +- ...alerVehicle_PopulatesValidationSummary.txt | 4 +- ...Site.Aria.RemoteAttribute_Home.Create.html | 2 +- ...Site.Root.RemoteAttribute_Home.Create.html | 2 +- 27 files changed, 233 insertions(+), 163 deletions(-) diff --git a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DataAnnotationsClientModelValidatorProvider.cs b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DataAnnotationsClientModelValidatorProvider.cs index 1efa543181..356fa6c9f6 100644 --- a/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DataAnnotationsClientModelValidatorProvider.cs +++ b/src/Microsoft.AspNet.Mvc.Core/ModelBinding/Validation/DataAnnotationsClientModelValidatorProvider.cs @@ -32,14 +32,24 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Validation /// public void GetValidators(ClientValidatorProviderContext context) { + var hasRequiredAttribute = false; + foreach (var attribute in context.ValidatorMetadata.OfType()) { + hasRequiredAttribute |= attribute is RequiredAttribute; + DataAnnotationsClientModelValidationFactory factory; if (_attributeFactories.TryGetValue(attribute.GetType(), out factory)) { context.Validators.Add(factory(attribute)); } } + + if (!hasRequiredAttribute && context.ModelMetadata.IsRequired) + { + // Add a default '[Required]' validator for generating HTML if necessary. + context.Validators.Add(new RequiredAttributeAdapter(new RequiredAttribute())); + } } private static Dictionary BuildAttributeFactoriesDictionary() diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DataAnnotationsClientModelValidatorProviderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DataAnnotationsClientModelValidatorProviderTest.cs index 780be98ea3..10f2ede1f9 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DataAnnotationsClientModelValidatorProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DataAnnotationsClientModelValidatorProviderTest.cs @@ -14,12 +14,53 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Validation private readonly IModelMetadataProvider _metadataProvider = TestModelMetadataProvider.CreateDefaultProvider(); [Fact] - public void GetValidators_DoesNotAddRequiredAttribute_IfAttributeIsSpecifiedExplicitly() + public void GetValidators_AddsRequiredAttribute_ForIsRequiredTrue() { // Arrange var provider = new DataAnnotationsClientModelValidatorProvider(); - var metadata = _metadataProvider.GetMetadataForProperty(typeof(DummyRequiredAttributeHelperClass), - "WithAttribute"); + + var metadata = _metadataProvider.GetMetadataForProperty( + typeof(DummyRequiredAttributeHelperClass), + nameof(DummyRequiredAttributeHelperClass.ValueTypeWithoutAttribute)); + + var providerContext = new ClientValidatorProviderContext(metadata); + + // Act + provider.GetValidators(providerContext); + + // Assert + var validator = Assert.Single(providerContext.Validators); + Assert.IsType(validator); + } + + [Fact] + public void GetValidators_DoesNotAddRequiredAttribute_ForIsRequiredFalse() + { + // Arrange + var provider = new DataAnnotationsClientModelValidatorProvider(); + + var metadata = _metadataProvider.GetMetadataForProperty( + typeof(DummyRequiredAttributeHelperClass), + nameof(DummyRequiredAttributeHelperClass.ReferenceTypeWithoutAttribute)); + + var providerContext = new ClientValidatorProviderContext(metadata); + + // Act + provider.GetValidators(providerContext); + + // Assert + Assert.Empty(providerContext.Validators); + } + + [Fact] + public void GetValidators_DoesNotAddExtraRequiredAttribute_IfAttributeIsSpecifiedExplicitly() + { + // Arrange + var provider = new DataAnnotationsClientModelValidatorProvider(); + + var metadata = _metadataProvider.GetMetadataForProperty( + typeof(DummyRequiredAttributeHelperClass), + nameof(DummyRequiredAttributeHelperClass.WithAttribute)); var providerContext = new ClientValidatorProviderContext(metadata); @@ -76,8 +117,9 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Validation [Theory] [MemberData(nameof(DataAnnotationAdapters))] - public void AdapterFactory_RegistersAdapters_ForDataAnnotationAttributes(ValidationAttribute attribute, - Type expectedAdapterType) + public void AdapterFactory_RegistersAdapters_ForDataAnnotationAttributes( + ValidationAttribute attribute, + Type expectedAdapterType) { // Arrange var adapters = new DataAnnotationsClientModelValidatorProvider().AttributeFactories; @@ -103,8 +145,9 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Validation [Theory] [MemberData(nameof(DataTypeAdapters))] - public void AdapterFactory_RegistersAdapters_ForDataTypeAttributes(ValidationAttribute attribute, - string expectedRuleName) + public void AdapterFactory_RegistersAdapters_ForDataTypeAttributes( + ValidationAttribute attribute, + string expectedRuleName) { // Arrange var adapters = new DataAnnotationsClientModelValidatorProvider().AttributeFactories; @@ -148,7 +191,9 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Validation [Required(ErrorMessage = "Custom Required Message")] public int WithAttribute { get; set; } - public int WithoutAttribute { get; set; } + public int ValueTypeWithoutAttribute { get; set; } + + public string ReferenceTypeWithoutAttribute { get; set; } } } } diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultModelClientValidatorProviderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultModelClientValidatorProviderTest.cs index f26455ee04..ae6a7b3642 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultModelClientValidatorProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultModelClientValidatorProviderTest.cs @@ -117,7 +117,9 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Validation // Assert var validators = context.Validators; - Assert.IsType(Assert.Single(validators)); + Assert.Equal(2, validators.Count); + Assert.Single(validators, v => v is RangeAttributeAdapter); + Assert.Single(validators, v => v is RequiredAttributeAdapter); } [Fact] @@ -159,7 +161,9 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Validation // Assert var validators = context.Validators; - Assert.IsType(Assert.Single(validators)); + Assert.Equal(2, validators.Count); + Assert.Single(validators, v => v is RangeAttributeAdapter); + Assert.Single(validators, v => v is RequiredAttributeAdapter); } [Fact] @@ -245,7 +249,7 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Validation private class CustomValidationAttributeOnProperty { [CustomValidation] - public int Property { get; set; } + public string Property { get; set; } } private class ProductEntity diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultModelValidatorProviderTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultModelValidatorProviderTest.cs index 923672d64f..a03bb010fa 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultModelValidatorProviderTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/ModelBinding/Validation/DefaultModelValidatorProviderTest.cs @@ -96,38 +96,16 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Validation Assert.Single(validators, v => Assert.IsType(v).Tag == "Property"); } - // RangeAttribute is an example of a ValidationAttribute with it's own adapter type. [Fact] - public void GetValidators_DataAnnotationsAttribute_SpecificAdapter() - { - // Arrange - var metadataProvider = TestModelMetadataProvider.CreateDefaultProvider(); - var validatorProvider = TestClientModelValidatorProvider.CreateDefaultProvider(); - - var metadata = metadataProvider.GetMetadataForProperty( - typeof(RangeAttributeOnProperty), - nameof(RangeAttributeOnProperty.Property)); - var context = new ClientValidatorProviderContext(metadata); - - // Act - validatorProvider.GetValidators(context); - - // Assert - var validators = context.Validators; - - Assert.IsType(Assert.Single(validators)); - } - - [Fact] - public void GetValidators_DataAnnotationsAttribute_DefaultAdapter() + public void GetValidators_FromModelMetadataType_SingleValidator() { // Arrange var metadataProvider = TestModelMetadataProvider.CreateDefaultProvider(); var validatorProvider = TestModelValidatorProvider.CreateDefaultProvider(); var metadata = metadataProvider.GetMetadataForProperty( - typeof(CustomValidationAttributeOnProperty), - nameof(CustomValidationAttributeOnProperty.Property)); + typeof(ProductViewModel), + nameof(ProductViewModel.Id)); var context = new ModelValidatorProviderContext(metadata); // Act @@ -136,28 +114,8 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Validation // Assert var validators = context.Validators; - Assert.IsType(Assert.Single(validators)); - } - - [Fact] - public void GetValidators_FromModelMetadataType_SingleValidator() - { - // Arrange - var metadataProvider = TestModelMetadataProvider.CreateDefaultProvider(); - var validatorProvider = TestClientModelValidatorProvider.CreateDefaultProvider(); - - var metadata = metadataProvider.GetMetadataForProperty( - typeof(ProductViewModel), - nameof(ProductViewModel.Id)); - var context = new ClientValidatorProviderContext(metadata); - - // Act - validatorProvider.GetValidators(context); - - // Assert - var validators = context.Validators; - - Assert.IsType(Assert.Single(validators)); + var adapter = Assert.IsType(Assert.Single(validators)); + Assert.IsType(adapter.Attribute); } [Fact] @@ -165,12 +123,12 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Validation { // Arrange var metadataProvider = TestModelMetadataProvider.CreateDefaultProvider(); - var validatorProvider = TestClientModelValidatorProvider.CreateDefaultProvider(); + var validatorProvider = TestModelValidatorProvider.CreateDefaultProvider(); var metadata = metadataProvider.GetMetadataForProperty( typeof(ProductViewModel), nameof(ProductViewModel.Name)); - var context = new ClientValidatorProviderContext(metadata); + var context = new ModelValidatorProviderContext(metadata); // Act validatorProvider.GetValidators(context); @@ -179,8 +137,8 @@ namespace Microsoft.AspNet.Mvc.ModelBinding.Validation var validators = context.Validators; Assert.Equal(2, validators.Count); - Assert.Single(validators, v => v is RegularExpressionAttributeAdapter); - Assert.Single(validators, v => v is StringLengthAttributeAdapter); + Assert.Single(validators, v => ((DataAnnotationsModelValidator)v).Attribute is RegularExpressionAttribute); + Assert.Single(validators, v => ((DataAnnotationsModelValidator)v).Attribute is StringLengthAttribute); } private class ValidatableObject : IValidatableObject diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/DefaultEditorTemplatesTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/DefaultEditorTemplatesTest.cs index 624633814b..997c8ae3ec 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/DefaultEditorTemplatesTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/DefaultEditorTemplatesTest.cs @@ -589,8 +589,13 @@ Environment.NewLine; public void Editor_FindsCorrectDateOrTimeTemplate(string dataTypeName, string editFormatString, string expected) { // Arrange - var expectedInput = ""; + var expectedInput = + ""; + var offset = TimeSpan.FromHours(0); var model = new DateTimeOffset( year: 2000, @@ -636,8 +641,12 @@ Environment.NewLine; public void Editor_AppliesRfc3339(string dataTypeName, string editFormatString, string expected) { // Arrange - var expectedInput = ""; + var expectedInput = + ""; // Place DateTime-local value in current timezone. var offset = string.Equals("", dataTypeName) ? DateTimeOffset.Now.Offset : TimeSpan.FromHours(0); @@ -689,8 +698,13 @@ Environment.NewLine; public void Editor_AppliesNonDefaultEditFormat(string dataTypeName, Html5DateRenderingMode renderingMode) { // Arrange - var expectedInput = ""; + var expectedInput = + ""; + var offset = TimeSpan.FromHours(0); var model = new DateTimeOffset( year: 2000, diff --git a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperCheckboxTest.cs b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperCheckboxTest.cs index 2c9f3499d8..83d46deffd 100644 --- a/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperCheckboxTest.cs +++ b/test/Microsoft.AspNet.Mvc.Core.Test/Rendering/HtmlHelperCheckboxTest.cs @@ -17,8 +17,11 @@ namespace Microsoft.AspNet.Mvc.Rendering public void CheckBoxOverridesCalculatedValuesWithValuesFromHtmlAttributes() { // Arrange - var expected = @""; + var expected = + @""; var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetTestModelViewData()); // Act @@ -34,8 +37,12 @@ namespace Microsoft.AspNet.Mvc.Rendering public void CheckBoxExplicitParametersOverrideDictionary_ForValueInModel() { // Arrange - var expected = @""; + var expected = + @""; + var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetTestModelViewData()); // Act @@ -81,8 +88,11 @@ namespace Microsoft.AspNet.Mvc.Rendering public void CheckBoxCheckedWithOnlyName() { // Arrange - var expected = @""; + var expected = + @""; var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetTestModelViewData()); // Act @@ -96,8 +106,10 @@ namespace Microsoft.AspNet.Mvc.Rendering public void CheckBoxUsesAttemptedValueFromModelState() { // Arrange - var expected = @"" + - @""; + var expected = + @"" + + @""; var valueProviderResult = new ValueProviderResult("false", "false", CultureInfo.InvariantCulture); var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetTestModelViewData()); helper.ViewData.ModelState.SetModelValue("Property1", valueProviderResult); @@ -129,9 +141,12 @@ namespace Microsoft.AspNet.Mvc.Rendering public void CheckBoxReplacesUnderscoresInHtmlAttributesWithDashes() { // Arrange - var expected = @""; + var expected = + @""; var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetTestModelViewData()); var htmlAttributes = new { Property1_Property3 = "Property3ObjValue" }; @@ -184,9 +199,11 @@ namespace Microsoft.AspNet.Mvc.Rendering public void CheckBoxWithPrefixAndEmptyName() { // Arrange - var expected = @""; + var expected = + @""; var helper = DefaultTemplatesUtilities.GetHtmlHelper(model: false); var attributes = new Dictionary { { "Property3", "Property3Value" } }; helper.ViewContext.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix"; @@ -202,9 +219,12 @@ namespace Microsoft.AspNet.Mvc.Rendering public void CheckBoxWithComplexExpressionsEvaluatesValuesInViewDataDictionary() { // Arrange - var expected = @""; + var expected = + @""; var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetModelWithValidationViewData()); // Act @@ -218,8 +238,10 @@ namespace Microsoft.AspNet.Mvc.Rendering public void CheckBoxForWithNullContainer_TreatsBooleanAsFalse() { // Arrange - var expected = @"" + - @""; + var expected = + @"" + + @""; var viewData = GetTestModelViewData(); var helper = DefaultTemplatesUtilities.GetHtmlHelper(viewData); var valueProviderResult = new ValueProviderResult("false", "false", CultureInfo.InvariantCulture); @@ -238,8 +260,10 @@ namespace Microsoft.AspNet.Mvc.Rendering public void CheckBoxForWithNonNullContainer_UsesPropertyValue(bool value, string expectedChecked) { // Arrange - var expected = @"" + - @""; + var expected = + @"" + + @""; expected = string.Format(expected, expectedChecked); var viewData = GetTestModelViewData(); @@ -261,8 +285,11 @@ namespace Microsoft.AspNet.Mvc.Rendering public void CheckBoxForOverridesCalculatedParametersWithValuesFromHtmlAttributes() { // Arrange - var expected = @""; + var expected = + @""; var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetTestModelViewData()); // Act @@ -299,8 +326,10 @@ namespace Microsoft.AspNet.Mvc.Rendering public void CheckBoxFor_UsesModelStateAttemptedValue(string attemptedValue, string expectedChecked) { // Arrange - var expected = @"" + - @""; + var expected = + @"" + + @""; expected = string.Format(expected, expectedChecked); var viewData = GetTestModelViewData(); @@ -320,9 +349,11 @@ namespace Microsoft.AspNet.Mvc.Rendering public void CheckBoxFor_WithObjectAttribute_MapsUnderscoresInNamesToDashes() { // Arrange - var expected = @""; + var expected = + @""; var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetTestModelViewData()); var htmlAttributes = new { Property1_Property3 = "Property3ObjValue" }; @@ -337,9 +368,11 @@ namespace Microsoft.AspNet.Mvc.Rendering public void CheckBoxForWith_AttributeDictionary_GeneratesExpectedAttributes() { // Arrange - var expected = @""; + var expected = + @""; var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetTestModelViewData()); var attributes = new Dictionary { { "Property3", "Property3Value" } }; @@ -354,9 +387,11 @@ namespace Microsoft.AspNet.Mvc.Rendering public void CheckBoxForWithPrefix() { // Arrange - var expected = @""; + var expected = + @""; var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetTestModelViewData()); helper.ViewContext.ViewData.TemplateInfo.HtmlFieldPrefix = "MyPrefix"; var attributes = new Dictionary { { "Property3", "PropValue" } }; @@ -372,9 +407,11 @@ namespace Microsoft.AspNet.Mvc.Rendering public void CheckBoxFor_WithComplexExpressions_DoesNotUseValuesFromViewDataDictionary() { // Arrange - var expected = @""; + var expected = + @""; var helper = DefaultTemplatesUtilities.GetHtmlHelper(GetModelWithValidationViewData()); // Act diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/HtmlHelperOptionsTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/HtmlHelperOptionsTest.cs index a031489f10..9e16cbc932 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/HtmlHelperOptionsTest.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/HtmlHelperOptionsTest.cs @@ -60,7 +60,7 @@ False"; An error occurred.
-
+
True diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/PrecompilationTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/PrecompilationTest.cs index 3b28de0c25..cb2a44376b 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/PrecompilationTest.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/PrecompilationTest.cs @@ -236,9 +236,11 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests { // Arrange var assemblyNamePrefix = GetAssemblyNamePrefix(); - var expected = @"Back to List"; + @"data-val-range-min=""10"" data-val-required=""The Age field is required."" " + + @"id=""Age"" name=""Age"" value="""" />Back to List"; var server = TestHelper.CreateServer(_app, SiteName, _configureServices); var client = server.CreateClient(); diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ModelBindingWebSite.Vehicle.Edit.Invalid.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ModelBindingWebSite.Vehicle.Edit.Invalid.html index a008cb38d6..99db7e9f37 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ModelBindingWebSite.Vehicle.Edit.Invalid.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ModelBindingWebSite.Vehicle.Edit.Invalid.html @@ -9,14 +9,14 @@
The field Vin must be a string with a maximum length of 8.
-
The field Year must be between 1980 and 2034.
+
The field Year must be between 1980 and 2034.
- +
\ No newline at end of file diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ModelBindingWebSite.Vehicle.Edit.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ModelBindingWebSite.Vehicle.Edit.html index a1a527e62a..e5c6ba4ef3 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ModelBindingWebSite.Vehicle.Edit.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ModelBindingWebSite.Vehicle.Edit.html @@ -7,14 +7,14 @@
-
+
- +
\ No newline at end of file diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Customer.Index.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Customer.Index.html index 6561ab094a..5596228a80 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Customer.Index.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Customer.Index.html @@ -6,7 +6,7 @@
- + The value '' is invalid.
@@ -29,7 +29,7 @@
- Male + Male Female
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.CreateWarehouse.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.CreateWarehouse.html index da8a71a57d..b7d6e1c4c5 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.CreateWarehouse.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.CreateWarehouse.html @@ -10,7 +10,7 @@
- diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.Customer.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.Customer.html index 34d4c8e1da..e9cde95b04 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.Customer.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.Customer.html @@ -6,7 +6,7 @@
- +
@@ -29,7 +29,7 @@
- Male + Male Female
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.EditWarehouse.Encoded.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.EditWarehouse.Encoded.html index 26941871f6..218ce72280 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.EditWarehouse.Encoded.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.EditWarehouse.Encoded.html @@ -28,7 +28,7 @@ HtmlEncode[[Address_1]];
- Female + Female Male
@@ -38,7 +38,7 @@ HtmlEncode[[Address_1]];
- +
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.EditWarehouse.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.EditWarehouse.html index 150c1c6cd8..59957a8ea2 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.EditWarehouse.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.EditWarehouse.html @@ -28,7 +28,7 @@ Address_1;
- Female + Female Male
@@ -38,7 +38,7 @@ Address_1;
- +
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.EmployeeList.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.EmployeeList.html index 35b0467617..8f377c6caf 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.EmployeeList.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.EmployeeList.html @@ -6,7 +6,7 @@
- +
@@ -21,13 +21,13 @@ EmployeeName_0
-
- +
@@ -38,7 +38,7 @@ EmployeeName_0
- +
@@ -53,13 +53,13 @@ EmployeeName_1
-
- +
@@ -70,7 +70,7 @@ EmployeeName_1
- +
@@ -85,13 +85,13 @@ EmployeeName_2
-
- +
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.Order.Encoded.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.Order.Encoded.html index c1fb5671a9..2cd434020d 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.Order.Encoded.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.Order.Encoded.html @@ -14,7 +14,7 @@
- +
@@ -34,11 +34,11 @@
- +
- +
@@ -49,7 +49,7 @@
- +
@@ -72,7 +72,7 @@
- Male + Male Female
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.Order.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.Order.html index 7871b4857d..15fcb9678b 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.Order.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.Order.html @@ -14,7 +14,7 @@
- +
@@ -34,11 +34,11 @@
- +
- +
@@ -49,7 +49,7 @@
- +
@@ -72,7 +72,7 @@
- Male + Male Female
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.OrderUsingHtmlHelpers.Encoded.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.OrderUsingHtmlHelpers.Encoded.html index 5f5fd01a46..4e7b25450b 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.OrderUsingHtmlHelpers.Encoded.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.OrderUsingHtmlHelpers.Encoded.html @@ -14,7 +14,7 @@
- +
@@ -34,11 +34,11 @@
- +
- +
@@ -48,7 +48,7 @@
- +
@@ -71,7 +71,7 @@
- Male + Male Female
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.OrderUsingHtmlHelpers.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.OrderUsingHtmlHelpers.html index 1a1bf24d87..8386a1d79f 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.OrderUsingHtmlHelpers.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.OrderUsingHtmlHelpers.html @@ -14,7 +14,7 @@
- +
@@ -34,11 +34,11 @@
- +
- +
@@ -48,7 +48,7 @@
- +
@@ -71,7 +71,7 @@
- Male + Male Female
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.ProductList.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.ProductList.html index ed470dd2f7..ecc8b1c13c 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.ProductList.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/MvcTagHelpersWebSite.MvcTagHelper_Home.ProductList.html @@ -11,7 +11,7 @@
- +
@@ -28,7 +28,7 @@
- +
@@ -45,7 +45,7 @@
- +
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/TagHelpersWebSite.Employee.Create.Invalid.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/TagHelpersWebSite.Employee.Create.Invalid.html index 99ca104941..7b4bf7a488 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/TagHelpersWebSite.Employee.Create.Invalid.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/TagHelpersWebSite.Employee.Create.Invalid.html @@ -25,7 +25,7 @@
- + The field Age must be between 10 and 100.
@@ -36,7 +36,7 @@
- +
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/TagHelpersWebSite.Employee.Create.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/TagHelpersWebSite.Employee.Create.html index 120e91115b..0b04a52aa6 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/TagHelpersWebSite.Employee.Create.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/TagHelpersWebSite.Employee.Create.html @@ -23,7 +23,7 @@
- +
@@ -34,7 +34,7 @@
- +
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/UpdateDealerVehicle_PopulatesPropertyErrorsInViews.txt b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/UpdateDealerVehicle_PopulatesPropertyErrorsInViews.txt index 8802bb6ddb..be69a486e9 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/UpdateDealerVehicle_PopulatesPropertyErrorsInViews.txt +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/UpdateDealerVehicle_PopulatesPropertyErrorsInViews.txt @@ -1,7 +1,7 @@ 
TestCarDealer SE - +
@@ -10,7 +10,7 @@ The field Vin must be a string with a maximum length of 8.
- + The field Year must be between 1980 and 2034.
\ No newline at end of file diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/UpdateDealerVehicle_PopulatesValidationSummary.txt b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/UpdateDealerVehicle_PopulatesValidationSummary.txt index 21edd0399d..baf61e3f81 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/UpdateDealerVehicle_PopulatesValidationSummary.txt +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/UpdateDealerVehicle_PopulatesValidationSummary.txt @@ -1,7 +1,7 @@ 
TestCarDealer SE - +
  • Make is invalid for region.
@@ -10,7 +10,7 @@
- +
\ No newline at end of file diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ValidationWebSite.Aria.RemoteAttribute_Home.Create.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ValidationWebSite.Aria.RemoteAttribute_Home.Create.html index e099e3d489..aa7de18bba 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ValidationWebSite.Aria.RemoteAttribute_Home.Create.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ValidationWebSite.Aria.RemoteAttribute_Home.Create.html @@ -33,7 +33,7 @@
- +
diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ValidationWebSite.Root.RemoteAttribute_Home.Create.html b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ValidationWebSite.Root.RemoteAttribute_Home.Create.html index 6177b95b26..12f2bdab67 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ValidationWebSite.Root.RemoteAttribute_Home.Create.html +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/compiler/resources/ValidationWebSite.Root.RemoteAttribute_Home.Create.html @@ -33,7 +33,7 @@
- +