is there an option to set some metadata from assets as a mandatory field ?
For data-objects you can create mandatory fields, but I need this option for the metadata of the asstes.
There is no such built-in option. But you can validate the data either in the frontend or the backend and disallow saving if not all required metadata is filled in.
You could for example throw a new Exception in a pre-update event listener:
throw new \Pimcore\Model\Element\ValidationException("This is your custom error message", 1234);
You could also check the data in the frontend as described here: