Closed dbu closed 10 years ago
There should be a way indeed to show the exact error message.
In the past I managed to get a custom error message attached to a field using the Symfony\Component\Validator\ExecutionContext
specifying the property path and violation. I think this is not what you want to do here, however I wonder if the form framework triggers this somewere for the upload field and how it passes then the error?
ping
this is now ready to merge. we still only get the generic invalid value message, seems the message from the transformer can't get forwarded to the form output and we would need a validator. however i have no clue where and how we would do that, so lets merge this as its a big improvement already.
reverted the change in testing that created corebundle dependency and retriggered the build
okay, the tests seem to be a mess. but maybe i am just reveiling issues that went unnoticed before? would be great if somebody can sort this out for 1.1
i really do not know this Bundle very well .. tests seem to be green now ..
When uploading files through a form, there is no error handling. I thought we could use the upload file helper from the form type as well. This at least now gives a message that something went wrong and makes the upload file field marked as the field with error. however, it only gives the generic "invalid value" hint and does not show the ecxeption i throw. is there a way to better control that and give the exact error message like "file too big"?