There are two ways to validate a form. Client validation with html5 and/or javascript and server validation with php.
When it comes to forms with file upload fields, the client validation is preferred because otherwise you will have to force your users to browse to any files again after validation because their values cannot be maintained after a form submit and returning to the page.
Just about all validation is possible with html and javascript and it is definitely the preferred option when file upload fields are present for precisely this reason.