How do I stop an out of balance AP invoice from importing?

When Importing into AP_InvoiceHeader both the total and line distributions are included.

How do I get an error message to compare and flag the out of balance.

Then stop that invoice from being imported?