In handleFormSubmission you have validate if condition with pekeUpload.files.length where length is integer and it can never be empty thus means your validation is not working because 0 is not empty Please update your code and add pekeUpload.files.length!='' && pekeUpload.files.length!=0.
on formSubmit = true has bugs if you keep your code length!='' because 0 is not empty as string when the form has no files files[pos] = null on success or user have not selected any files click on submit button will redirect user to (form action="page") action page.
In
handleFormSubmission
you have validate if condition withpekeUpload.files.length
where length is integer and it can never be empty thus means your validation is not working because 0 is not empty Please update your code and addpekeUpload.files.length!='' && pekeUpload.files.length!=0
.on
formSubmit = true
has bugs if you keep your codelength!=''
because0
is not empty as string when the form has no filesfiles[pos] = null
on success or user have not selected any files click on submit button will redirect user to (formaction="page"
) action page.