Image
Bathrooms are divided into certain zones when it comes to electrical items as the below image taken from BS7671 on site guide:
All electrical items need a certain degree of protective measures against the potential influences that may come from installing inside certain zones as show in this table:
Typically switches aren't allowed inside zones 0/1/2 and all items need to have a specified rating for there IP (Ingress Protection) as below: