This is a migrated thread and some comments may be shown as answers.

'Kendo.Mvc.UI.Fluent.UploadBuilder' does not contain a definition for 'Validation'

1 Answer 1057 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Rajesh
Top achievements
Rank 1
Rajesh asked on 19 Apr 2017, 03:55 AM

Hi Team,

I am trying to create simple upload section using code shared further down, but it gives me below error saying validation is not defined error.

'Kendo.Mvc.UI.Fluent.UploadBuilder' does not contain a definition for 'Validation' and no extension method 'Validation' accepting a first argument of type 'Kendo.Mvc.UI.Fluent.UploadBuilder' could be found (are you missing a using directive or an assembly reference?)

 

I tried putting below in view but not fixed, not sure where this method comes from. Do i need to upgrade dll version as of now i am using 2014.3.1119.

@using Kendo.Mvc.Extensions;

 

Please suggest what i am missing. thanks.

@(Html.Kendo().Upload()
.Name("documentUploader")
.Messages(m => m.Select("Browse").UploadSelectedFiles("Upload"))
.Events(events =>
events.Success("uploadSuccess")
    .Complete("uploadComplete")
    .Error("onError")
    .Upload("uploadClick")
)
.Multiple(false)
.Async(a => a
    .Save("UploadDocument", "Document")
    .AutoUpload(false)
    .SaveField("uploadedDocuments")
)
.Validation(validation => validation.AllowedExtensions(new string[] { ".zip", ".rar" }).MaxFileSize(3145728)))

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 20 Apr 2017, 05:30 AM
Hello Rajesh,

The Upload's validation functionality was added in Q3 2016. If you want to use it we recommend upgrading because it is not available in Kendo UI versions prior to 2016.3.914.

Regards,
Ivan Danchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Upload
Asked by
Rajesh
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or