Laws about dating coworkers
It is indeed legal to prohibit dating between coworkers (with a few exceptions, such as in California, where courts have ruled that the state constitution provides broader privacy protection in employment matters).
And you can indeed have a policy that requires one of the parties to move on if a relationship happens.
This is a written confirmation to management that any relationship taking place between employees is consensual. According to attorney Ray Gallo, writing for the Daily Journal, forcing an employee to chose between their job and their partner would constitute an invasion of privacy, while a requirement to inform the company of a relationship would not.
The contract may also include the employees' written confirmation that they have been informed of the company's dating policy and the behavior that is expected of them, such as refraining from any acts of retaliation if the relationship ends. When writing a workplace dating policy, it is important to reduce your potential legal liability.
Without a clear policy, an office relationship can lead to charges of sexual harassment and legal consequences for the employer.
What’s not legal, though, is to always have women be the ones who have to leave.
If indeed that’s how your company does it, that’s sex discrimination and is illegal.
This helps to protect the company from later charges that the relationship was not consensual and constituted sexual harassment.
With this type of policy, the employees would also have to notify you whenever a relationship ends.