Program rule - Showing an error if the option is already selected in a repeatable stage

Hi,

In a repeatable stage, I have a data element (select group) that has an option set group/options group 1, group 2, group 3. I would like to have a program rule that shows an error if a user tries to select the same option twice for a tracked entity.

I would appreciate a step by step process of building the program rule.