What is the business objective that you are trying to achieve? To me it sounds a big customization, maybe based on some item fields. Changing the code for validation is not a great idea, you may change code for validation but real problem may come up in SO and PO creation.
This customization is required for maintaining the item price based on the customer, item, site, warehouse, unit and one of the customized fields in trade agreements. So whenever this combination has got selected in Sales order lines, then the sales price must be updated from trade agreements.
But to add two different trade agreement records with almost same combination except different values in the customized fields needs some validation change.