Closed getme closed 7 years ago
One more issue
/** * @FileStore\Uploadable() **/ class VehicleCat { /** * @var string * * @ORM\Column(name="image", type="array", nullable=true) * @FileStore\UploadableField(mapping="vehicle_cat") * @Assert\File(maxSize="20M") */ private $image; } // MyFormType.php $builder->add('vehicle_cat', 'entity', array( 'class' => 'MyBundle:VehicleCat', ));
Throws
Expected argument of type string, array given in vendor/symfony/symfony/src/Symfony/Component/Validator/Constraints/FileValidator.php at line 80
I know that's because MyFormType has cascade_validation set to true and VehicleCat gets validated. any solutions? Thanks
I had the same problem when using a FormType that does not contain the file field. This was solved by using validation groups.
please get example for fix this problem
One more issue
Throws
I know that's because MyFormType has cascade_validation set to true and VehicleCat gets validated. any solutions? Thanks