You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unless I'm doing something wrong, it seems entity file validation doesn't appear to work out of the box?
* @Assert\Image(
* minWidth = 200,
* minWidthMessage = "The image must be at least 200x200px",
* maxWidth = 20000,
* maxWidthMessage = "The image must be below 20,000x20,000px",
* minHeight = 200,
* minHeightMessage = "The image must be at least 200x200px",
* maxHeight = 20000,
* maxHeightMessage = "The image must be below 20,000x20,000px",
* sizeNotDetectedMessage = "Image size couldn't be detected",
* detectCorrupted = true,
* corruptedMessage = "The image is corrupt!"
* )
The form fails validation with 'File not found' which makes sense as the path to the file stored in the entities property is simply '/{random}' by default.
Is there a way to make entity validation work?
The text was updated successfully, but these errors were encountered:
need to some how convert the path from gaufrette to a symfony file object, but this is more upload portion?
it should work out of the box when you use the symfony form to do upload/verification after which getting the data from the form to right to the fs, however if you are fetching path from database and do the verification after fetching, you need to convert that path into file object as mentioned above.
Good afternoon!
Unless I'm doing something wrong, it seems entity file validation doesn't appear to work out of the box?
The form fails validation with 'File not found' which makes sense as the path to the file stored in the entities property is simply '/{random}' by default.
Is there a way to make entity validation work?
The text was updated successfully, but these errors were encountered: