diff --git a/src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj b/src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj
index f01d713f0f..9fa659b1f2 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj
+++ b/src/Microsoft.AspNet.Mvc.Core/Microsoft.AspNet.Mvc.Core.kproj
@@ -197,6 +197,7 @@
+
diff --git a/src/Microsoft.AspNet.Mvc.Core/Properties/Resources.Designer.cs b/src/Microsoft.AspNet.Mvc.Core/Properties/Resources.Designer.cs
index 04bfed9fb5..db0026933e 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Properties/Resources.Designer.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Properties/Resources.Designer.cs
@@ -939,6 +939,86 @@ namespace Microsoft.AspNet.Mvc.Core
return string.Format(CultureInfo.CurrentCulture, GetString("FilterFactoryAttribute_TypeMustImplementIFilter"), p0, p1);
}
+ ///
+ /// Validation parameter names in unobtrusive client validation rules cannot be empty. Client rule type: {0}
+ ///
+ internal static string UnobtrusiveJavascript_ValidationParameterCannotBeEmpty
+ {
+ get { return GetString("UnobtrusiveJavascript_ValidationParameterCannotBeEmpty"); }
+ }
+
+ ///
+ /// Validation parameter names in unobtrusive client validation rules cannot be empty. Client rule type: {0}
+ ///
+ internal static string FormatUnobtrusiveJavascript_ValidationParameterCannotBeEmpty(object p0)
+ {
+ return string.Format(CultureInfo.CurrentCulture, GetString("UnobtrusiveJavascript_ValidationParameterCannotBeEmpty"), p0);
+ }
+
+ ///
+ /// Validation parameter names in unobtrusive client validation rules must start with a lowercase letter and consist of only lowercase letters or digits. Validation parameter name: {0}, client rule type: {1}
+ ///
+ internal static string UnobtrusiveJavascript_ValidationParameterMustBeLegal
+ {
+ get { return GetString("UnobtrusiveJavascript_ValidationParameterMustBeLegal"); }
+ }
+
+ ///
+ /// Validation parameter names in unobtrusive client validation rules must start with a lowercase letter and consist of only lowercase letters or digits. Validation parameter name: {0}, client rule type: {1}
+ ///
+ internal static string FormatUnobtrusiveJavascript_ValidationParameterMustBeLegal(object p0, object p1)
+ {
+ return string.Format(CultureInfo.CurrentCulture, GetString("UnobtrusiveJavascript_ValidationParameterMustBeLegal"), p0, p1);
+ }
+
+ ///
+ /// Validation type names in unobtrusive client validation rules cannot be empty. Client rule type: {0}
+ ///
+ internal static string UnobtrusiveJavascript_ValidationTypeCannotBeEmpty
+ {
+ get { return GetString("UnobtrusiveJavascript_ValidationTypeCannotBeEmpty"); }
+ }
+
+ ///
+ /// Validation type names in unobtrusive client validation rules cannot be empty. Client rule type: {0}
+ ///
+ internal static string FormatUnobtrusiveJavascript_ValidationTypeCannotBeEmpty(object p0)
+ {
+ return string.Format(CultureInfo.CurrentCulture, GetString("UnobtrusiveJavascript_ValidationTypeCannotBeEmpty"), p0);
+ }
+
+ ///
+ /// Validation type names in unobtrusive client validation rules must consist of only lowercase letters. Invalid name: "{0}", client rule type: {1}
+ ///
+ internal static string UnobtrusiveJavascript_ValidationTypeMustBeLegal
+ {
+ get { return GetString("UnobtrusiveJavascript_ValidationTypeMustBeLegal"); }
+ }
+
+ ///
+ /// Validation type names in unobtrusive client validation rules must consist of only lowercase letters. Invalid name: "{0}", client rule type: {1}
+ ///
+ internal static string FormatUnobtrusiveJavascript_ValidationTypeMustBeLegal(object p0, object p1)
+ {
+ return string.Format(CultureInfo.CurrentCulture, GetString("UnobtrusiveJavascript_ValidationTypeMustBeLegal"), p0, p1);
+ }
+
+ ///
+ /// Validation type names in unobtrusive client validation rules must be unique. The following validation type was seen more than once: {0}
+ ///
+ internal static string UnobtrusiveJavascript_ValidationTypeMustBeUnique
+ {
+ get { return GetString("UnobtrusiveJavascript_ValidationTypeMustBeUnique"); }
+ }
+
+ ///
+ /// Validation type names in unobtrusive client validation rules must be unique. The following validation type was seen more than once: {0}
+ ///
+ internal static string FormatUnobtrusiveJavascript_ValidationTypeMustBeUnique(object p0)
+ {
+ return string.Format(CultureInfo.CurrentCulture, GetString("UnobtrusiveJavascript_ValidationTypeMustBeUnique"), p0);
+ }
+
private static string GetString(string name, params string[] formatterNames)
{
var value = _resourceManager.GetString(name);
diff --git a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs
index c2e99616d0..9b3ca76b19 100644
--- a/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs
+++ b/src/Microsoft.AspNet.Mvc.Core/Rendering/Html/HtmlHelper.cs
@@ -48,6 +48,7 @@ namespace Microsoft.AspNet.Mvc.Rendering
private readonly IUrlHelper _urlHelper;
private readonly IViewEngine _viewEngine;
private readonly AntiForgery _antiForgeryInstance;
+ private readonly IActionBindingContextProvider _actionBindingContextProvider;
private ViewContext _viewContext;
@@ -57,13 +58,15 @@ namespace Microsoft.AspNet.Mvc.Rendering
public HtmlHelper(
[NotNull] IViewEngine viewEngine,
[NotNull] IModelMetadataProvider metadataProvider,
- [NotNull] IUrlHelper urlHelper,
- [NotNull] AntiForgery antiForgeryInstance)
+ [NotNull] IUrlHelper urlHelper,
+ [NotNull] AntiForgery antiForgeryInstance,
+ [NotNull] IActionBindingContextProvider actionBindingContextProvider)
{
_viewEngine = viewEngine;
MetadataProvider = metadataProvider;
_urlHelper = urlHelper;
_antiForgeryInstance = antiForgeryInstance;
+ _actionBindingContextProvider = actionBindingContextProvider;
// Underscores are fine characters in id's.
IdAttributeDotReplacement = "_";
@@ -640,8 +643,21 @@ namespace Microsoft.AspNet.Mvc.Rendering
// then we can't render the attributes (we'd have no