ValidatorTagHelper
Kendo UI Validator TagHelper ValidatorTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("form", Attributes = "kendo-validator")]
[HtmlTargetElement("div", Attributes = "kendo-validator")]
public class ValidatorTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent
Inheritance: objectTagHelperTagHelperBaseValidatorTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<form kendo-validator="true" name="validator" kendo-errorTemplate="<span>Validation error occurred.</span>">
</form>
Constructors
Initializes a new instance of the ValidatorTagHelper class.
Properties
The template which renders the validation error.
[HtmlAttributeName("kendo-errorTemplate")]
public string ErrorTemplate { get; set; }
Attribute initializator for the Kendo Validator.
[HtmlAttributeName("kendo-validator")]
public bool? IsEnabled { get; set; }
A Dictionary collection of strings that holds the messages of the validator.
[HtmlAttributeName("kendo-messages")]
public IDictionary<string, string> Messages { get; set; }
Triggered when the validation of the form completes.
[HtmlAttributeName("on-kendo-validate")]
public string OnValidate { get; set; }
Triggered when the validation state of an input changes from valid to invalid or vice versa.
[HtmlAttributeName("on-kendo-validateInput")]
public string OnValidateInput { get; set; }
A Dictionary collection of strings that holds the rules of the validator.
[HtmlAttributeName("kendo-rules")]
public IDictionary<string, string> Rules { get; set; }
Specifies whether the validation should be perfromed on blur event.
[HtmlAttributeName("kendo-validateOnBlur")]
public bool? ValidateOnBlur { get; set; }
Methods
Gets the initialization script.
protected override string GetInitializationScript()
The initialization script.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeMessagesSettings method.
protected Dictionary<string, object> SerializeMessagesSettings()
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the HTML output.
protected override void WriteHtml(TagHelperOutput output)
The TagHelper output.
Overrides: