Skip to content

Instantly share code, notes, and snippets.

@DalSoft
Last active December 15, 2015 23:09
Show Gist options
  • Save DalSoft/5338630 to your computer and use it in GitHub Desktop.
Save DalSoft/5338630 to your computer and use it in GitHub Desktop.
public static IDictionary<string, object> GetUnobtrusiveValidationAttributesFor<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression)
{
return html.GetUnobtrusiveValidationAttributes(ExpressionHelper.GetExpressionText(expression));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment