Skip to main content

ValidationExtensions

Assembly: ServiceStack.Razor.dll
View Source
Declaration
public static class ValidationExtensions

Properties

ResourceClassKey

View Source
Declaration
public static string ResourceClassKey { get; set; }

Methods

Validate(HtmlHelper, String)

View Source
Declaration
public static void Validate(this HtmlHelper htmlHelper, string modelName)
Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.StringmodelName

ValidateFor<TModel, TProperty>(HtmlHelper<TModel>, Expression<Func<TModel, TProperty>>)

View Source
Declaration
public static void ValidateFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression)
Parameters
TypeName
ServiceStack.Html.HtmlHelper<TModel>htmlHelper
System.Linq.Expressions.Expression<System.Func<<TModel>,<TProperty>>>expression
Type Parameters
  • TModel
  • TProperty

ValidationMessage(HtmlHelper, String)

View Source
Declaration
public static MvcHtmlString ValidationMessage(this HtmlHelper htmlHelper, string modelName)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.StringmodelName

ValidationMessage(HtmlHelper, String, Object)

View Source
Declaration
public static MvcHtmlString ValidationMessage(this HtmlHelper htmlHelper, string modelName, object htmlAttributes)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.StringmodelName
System.ObjecthtmlAttributes

ValidationMessage(HtmlHelper, String, String)

View Source
Declaration
public static MvcHtmlString ValidationMessage(this HtmlHelper htmlHelper, string modelName, string validationMessage)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.StringmodelName
System.StringvalidationMessage

ValidationMessage(HtmlHelper, String, String, Object)

View Source
Declaration
public static MvcHtmlString ValidationMessage(this HtmlHelper htmlHelper, string modelName, string validationMessage, object htmlAttributes)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.StringmodelName
System.StringvalidationMessage
System.ObjecthtmlAttributes

ValidationMessage(HtmlHelper, String, IDictionary<String, Object>)

View Source
Declaration
public static MvcHtmlString ValidationMessage(this HtmlHelper htmlHelper, string modelName, IDictionary<string, object> htmlAttributes)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.StringmodelName
System.Collections.Generic.IDictionary<System.String,System.Object>htmlAttributes

ValidationMessage(HtmlHelper, String, String, IDictionary<String, Object>)

View Source
Declaration
public static MvcHtmlString ValidationMessage(this HtmlHelper htmlHelper, string modelName, string validationMessage, IDictionary<string, object> htmlAttributes)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.StringmodelName
System.StringvalidationMessage
System.Collections.Generic.IDictionary<System.String,System.Object>htmlAttributes

ValidationMessageFor<TModel, TProperty>(HtmlHelper<TModel>, Expression<Func<TModel, TProperty>>)

View Source
Declaration
public static MvcHtmlString ValidationMessageFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelper<TModel>htmlHelper
System.Linq.Expressions.Expression<System.Func<<TModel>,<TProperty>>>expression
Type Parameters
  • TModel
  • TProperty

ValidationMessageFor<TModel, TProperty>(HtmlHelper<TModel>, Expression<Func<TModel, TProperty>>, String)

View Source
Declaration
public static MvcHtmlString ValidationMessageFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, string validationMessage)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelper<TModel>htmlHelper
System.Linq.Expressions.Expression<System.Func<<TModel>,<TProperty>>>expression
System.StringvalidationMessage
Type Parameters
  • TModel
  • TProperty

ValidationMessageFor<TModel, TProperty>(HtmlHelper<TModel>, Expression<Func<TModel, TProperty>>, String, Object)

View Source
Declaration
public static MvcHtmlString ValidationMessageFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, string validationMessage, object htmlAttributes)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelper<TModel>htmlHelper
System.Linq.Expressions.Expression<System.Func<<TModel>,<TProperty>>>expression
System.StringvalidationMessage
System.ObjecthtmlAttributes
Type Parameters
  • TModel
  • TProperty

ValidationMessageFor<TModel, TProperty>(HtmlHelper<TModel>, Expression<Func<TModel, TProperty>>, String, IDictionary<String, Object>)

View Source
Declaration
public static MvcHtmlString ValidationMessageFor<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, string validationMessage, IDictionary<string, object> htmlAttributes)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelper<TModel>htmlHelper
System.Linq.Expressions.Expression<System.Func<<TModel>,<TProperty>>>expression
System.StringvalidationMessage
System.Collections.Generic.IDictionary<System.String,System.Object>htmlAttributes
Type Parameters
  • TModel
  • TProperty

ErrorSummary(HtmlHelper)

View Source
Declaration
public static MvcHtmlString ErrorSummary(this HtmlHelper htmlHelper)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper

ValidationSummary(HtmlHelper)

View Source
Declaration
public static MvcHtmlString ValidationSummary(this HtmlHelper htmlHelper)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper

ValidationSummary(HtmlHelper, Boolean)

View Source
Declaration
public static MvcHtmlString ValidationSummary(this HtmlHelper htmlHelper, bool excludePropertyErrors)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.BooleanexcludePropertyErrors

ValidationSummary(HtmlHelper, String)

View Source
Declaration
public static MvcHtmlString ValidationSummary(this HtmlHelper htmlHelper, string message)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.Stringmessage

ValidationSummary(HtmlHelper, Boolean, String)

View Source
Declaration
public static MvcHtmlString ValidationSummary(this HtmlHelper htmlHelper, bool excludePropertyErrors, string message)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.BooleanexcludePropertyErrors
System.Stringmessage

ValidationSummary(HtmlHelper, String, Object)

View Source
Declaration
public static MvcHtmlString ValidationSummary(this HtmlHelper htmlHelper, string message, object htmlAttributes)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.Stringmessage
System.ObjecthtmlAttributes

ValidationSummary(HtmlHelper, Boolean, String, Object)

View Source
Declaration
public static MvcHtmlString ValidationSummary(this HtmlHelper htmlHelper, bool excludePropertyErrors, string message, object htmlAttributes)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.BooleanexcludePropertyErrors
System.Stringmessage
System.ObjecthtmlAttributes

ValidationSummary(HtmlHelper, String, IDictionary<String, Object>)

View Source
Declaration
public static MvcHtmlString ValidationSummary(this HtmlHelper htmlHelper, string message, IDictionary<string, object> htmlAttributes)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.Stringmessage
System.Collections.Generic.IDictionary<System.String,System.Object>htmlAttributes

ValidationSummary(HtmlHelper, Boolean, String, IDictionary<String, Object>)

View Source
Declaration
public static MvcHtmlString ValidationSummary(this HtmlHelper htmlHelper, bool excludePropertyErrors, string message, IDictionary<string, object> htmlAttributes)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.BooleanexcludePropertyErrors
System.Stringmessage
System.Collections.Generic.IDictionary<System.String,System.Object>htmlAttributes

ValidationSuccess(HtmlHelper, String, Object)

View Source
Declaration
public static MvcHtmlString ValidationSuccess(this HtmlHelper htmlHelper, string message, object htmlAttributes = null)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.Stringmessage
System.ObjecthtmlAttributes

ValidationSuccess(HtmlHelper, String, IDictionary<String, Object>)

View Source
Declaration
public static MvcHtmlString ValidationSuccess(this HtmlHelper htmlHelper, string message, IDictionary<string, object> htmlAttributes)
Returns

ServiceStack.Html.MvcHtmlString

Parameters
TypeName
ServiceStack.Html.HtmlHelperhtmlHelper
System.Stringmessage
System.Collections.Generic.IDictionary<System.String,System.Object>htmlAttributes