President Donald Trump on Sunday warned foreign companies to obey US law after some 300 allegedly illegal South Korean workers were arrested at a Hyundai-LG battery plant being built in the southern state of Georgia.