Kendo UI validation TagHelper UploadValidationSettingsTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
C#
[HtmlTargetElement("validation", ParentTag = "kendo-upload", TagStructure = TagStructure.WithoutEndTag)]
[HtmlTargetElement("validation", ParentTag = "upload-editor", TagStructure = TagStructure.WithoutEndTag)]
[SuppressTagRendering]
public class UploadValidationSettingsTagHelper : TagHelperChildBase, ITagHelper, ITagHelperComponent
Inheritance: objectTagHelperTagHelperChildBaseUploadValidationSettingsTagHelper
Implements:
Inherited Members
Example:
csharp
@addTagHelper *, Kendo.Mvc
<kendo-upload name="upload">
<validation allowed-extensions='[".jpg",".png",".gif"]' />
</kendo-upload>
Constructors
Initializes a new instance of the UploadValidationSettingsTagHelper class.
C#
public UploadValidationSettingsTagHelper()
Properties
A list of the file extensions which are allowed for upload. Recognizes entries of both .type and type values.
C#
public string[] AllowedExtensions { get; set; }
Defines the maximum file size in bytes allowed for upload.
C#
public double? MaxFileSize { get; set; }
Defines the minimum file size in bytes allowed for upload.
C#
public double? MinFileSize { get; set; }
Methods
Adds the current TagHelper instance to its parent TagHelper.
C#
protected override void AddSelfToParent(TagHelperContext context)
The TagHelper context.
Overrides:
C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.