avocode/FormExtensions — pull request #121 by satiricon (2014-05-12 21:14:53+00:00)
Title: Fixed empty file validation at form edit.

Added the file back into the form data (lost onbind) for NotNull validation.

If I want to make a file mandatory:

```
/**
* @Assert\NotNull
* @Assert\File(
* mimeTypes={"image/png", "image/jpeg", "image/pjpeg", "image/gif"}
* )
* @Vich\UploadableField(mapping="page_item", fileNameProperty="imagePath")
*/
protected $image;
```

It works as expected when making a new object but it fails on edit because, as the file is not uploaded again, the file property is empty at validation time.

That's why I added the file back in the form's data if it's not being deleted or if it's not being changed (if changed the file will be on the newly binded data).