It's possible to add custom storage conditions to a container. Those conditions allows you to extend container ability to remove or add items, based on pretty much anything you want.
To do so, you'll need to create a new script that implements the IStorageCondition interface.