President Donald Trump may face a tough legal battle to withhold federal funds from sanctuary cities and states, as he vows he will.