my problem is simple, i have a form with several text fields + file, some of them required (file is optional).
User is filling the form, choosing his avatar and clicking 'send', than my validation rule says that "username" field has too few characters, no problem so far, form rerenders with error messages and… file is gone. user has to upload it one more time ON EVERY VALIDATION (that returns error).
it looks like a design flaw or i'am missing something? i mean there should be some mechanism to persist data about uploaded file during validation stages (could be many of them), some hidden form fields?
i can hack some solution into CHtml::activeFileField but would like to know if there is a better approach?