diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/FileToArrayTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/FileToArrayTransformer.php index 3a16ed58fb..58c0e0f3b2 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/FileToArrayTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/FileToArrayTransformer.php @@ -64,11 +64,11 @@ class FileToArrayTransformer implements DataTransformerInterface } if (!array_key_exists('file', $array)) { - throw new TransformationFailedException('The key "file" is missing'); + throw new TransformationFailedException('The key "file" is missing.'); } if (!empty($array['file']) && !$array['file'] instanceof File) { - throw new TransformationFailedException('The key "file" should be empty or instance of File'); + throw new TransformationFailedException('The key "file" should be empty or instance of File (Have you set the "enctype" attribute of the form tag to "multipart/form-data"?).'); } return $array['file'];