To validate an Attachment control in InfoPath 2010 you can do one of the following.
Using the controls properties:
Right click on the Attachment control.
Select File Attachment Properties.
In the Validation section, select Cannot be blank.
Click Ok
Test it.
Using a Rule:
(Assume you have a Submit button)
Click on your Submit button.
In the Ribbon, click on Manage Rules.
In the Rules window, click on New.
For the Condition, select your Attachment control, then select is blank or is not blank.
is blank = no attachment
is not blank = a file is attached