Get your taxes done using TurboTax

Only the custodial parent can claim the personal exemption of the child on their tax return.  Unless the custodial parent relinquishes the child's personal exemption to the non-custodial parent by giving that parent a signed Form 8332.

The Internal Revenue Code of the United States is not affected by a family court order.

If the custodial parent is in violation of the court order, then that matter has to be taken up with the court.  The court has the power to compel the custodial parent to abide by the court order if they are in violation.