API
Version 7.x > API > Input validation in Contribution List View modes: 
User avatar
Member
Member
johnz - 5/1/2013 4:27:16 AM
   
Input validation in Contribution List
Hi all,

I'm using Contribution List for front end users to update document type records.
Just wondering how to perform validation within contribution list ? I have a File field that need to be checked before save. I want to display an error message and stop processing if the uploaded file is too large. CMSForm_OnAfterSave function in CMSWebParts\UserContributions\ContributionList.ascx.cs isn't very helpful here.

Thanks

User avatar
Kentico Support
Kentico Support
kentico_filipl - 5/3/2013 6:17:55 AM
   
RE:Input validation in Contribution List
Hi,

You need to use Direct uploader form control which creates a temporary file before clicking the Save button. Therefore you could achieve your required functionality by creating event handler for OnUploadFile event in which you can check the file's size and possibly display error message.

Best regards,
Filip Ligac