Spanish Prime Minister Pedro Sanchez has condemned US and Israeli strikes on Iran.