Page 1 of 1

Best practices to name conflicts/validation

PostPosted: 15 Mar 2018 00:41
by davenovo
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?

Re: Best practices to name conflicts/validation

PostPosted: 19 Mar 2018 11:43
by Alexander Bulei
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.

Re: Best practices to name conflicts/validation

PostPosted: 19 Mar 2018 18:09
by davenovo
The BeforeSubmitEx you sent is perfect for that!