The best way to learn how to write validation rules is to look at existing ones. The Rules Explorer window lets you view all of the rules in the open documents in Visio, and to see how they have been written.
Process tab before the Rules Explorer window is opened
Once the Rules Explorer window is open, more buttons on the Rules Tools group become available for use that enable rules to be edited, exported or imported.
Process tab when the Rules Explorer window is open