It’s fine to do so if it’s an intimate wedding with your nearest and dearest in attendance. If it’s a big party with an assortment of guests, it will be rude to open your gifts. However, whether a small or big event, keep the cards for later, to open in private.