CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Best practices to name conflicts/validation

by davenovo » 15 Mar 2018 00:41

If the user has selected to upload multiple files, what is the correct way to do validation?

i.e. lets say I dont want them to upload files where Length(filename).IsOdd? Do I check this in the OnBeforeSubmit? If the validation fails, how is the best way to either cancel the entire upload, or only cancel that file?
davenovo
 
Posts: 98
Joined: 03 Mar 2018 19:11

by Alexander Bulei » 19 Mar 2018 11:43

Hi davenovo,

i.e. lets say I dont want them to upload files where Length(filename).IsOdd? Do I check this in the OnBeforeSubmit? If the validation fails, how is the best way to either cancel the entire upload, or only cancel that file?


Yes, you must validate the files on that event.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by davenovo » 19 Mar 2018 18:09

The BeforeSubmitEx you sent is perfect for that!
davenovo
 
Posts: 98
Joined: 03 Mar 2018 19:11


Return to JQFileUpload

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.