A sub panel is located in the bedroom wall, back of this wall is the bath tub, we were discussing if this location was ok for a panel, the code is not in bathroom, this panel is not located in the bathroom.
I don't see where this would be any more cause for concern than a main panel backing up to an exterior wall. They are both subject to a "slight" amount of moisture in the form of vapor, but both are code acceptable.