->add('shots','file', array(
'multiple' => true,
**'constraints' => array(
new Constraints\Image(array(
'maxSize' => '10M',
'allowSquare' => false,
'allowPortrait' => false,
'minRatio' => 1.43,
'maxRatio' => 2.4
)),
)**
))
這是一個symfony表單的一部分,帶有整合的表單驗證器。但我得到我不錯誤理解:Symfony:文件約束錯誤
UnexpectedTypeException: Expected argument of type "string", "array" given
沒有標記的部分寄託都沒有工作。我檢查的形式約束參考,但我沒有得到解決......
您能否提供異常的堆棧跟蹤? – 2014-09-22 22:42:54
@barius我該怎麼做? – Smeaven 2014-09-23 13:07:58