No, it is not mandatory to disclose your OCD to your employer. However, OCD that involves compulsive behaviors that are time-consuming, such as checking and handwashing, could affect your job performance. Some may have pure obsessions, which may be mentally draining and disallows them from concentrating. In both cases, it is advisable to let your employer know.