The dress code includes the rules of sunbathing. Women are allowed to wear bathing suits at the beach and swimming pools areas, as long as all the offensive parts of the body are covered. As soon as the person leaves the designated area the body has to be covered according to the dress code of modesty. Sunbathing topless is not an option and walking home in your bikini is not an option either.
Such code is obeyed by most Emiratis and there is a general expectation that tourists and expats alike will respect it. Furthermore, the dress code is enforced in public places such as the mall where big signs in the entrance warn that women who have dressed immodestly will be asked to leave the premises.