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
I don't think this use case is common enough to ship such constraint in Symfony itself. I would suggest you to implement a custom constraint in your project.
MimeTypes::MAP is also hidden from the validator component.
You would have to use the public API of the MimeTypes. A way to check whether a mime type is know in this map is to use MimeTypesInterface::getExtensions(), and checking whether you get a non-empty list.
Description
I got a BinaryObjectType class, with having
xsd:base64Binary
as text value, andmimeCode
attribute.Now, I would like to check if
mimeCode
is a valid mime type.Maybe in strict mode, check against
MimeTypes::MAP
?Example
No response
The text was updated successfully, but these errors were encountered: