There’s quite a difference between casual clothes and dressing indecently. IMO jeans are fine as long as they’re inconspicuous (such as raggy jeans with holes in them or worn in such a way that the buttocks are showing) for such an event. Swimsuits are for a different type of event where if you’re showing up in trousers they would disqualify you.